Skip to content

Commit 47c9157

Browse files
committed
syntax: use fmt! over + in deriving/clone
1 parent cd2eb47 commit 47c9157

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libsyntax/ext/deriving/clone.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ fn cs_clone(
9191
all_fields = af;
9292
},
9393
EnumNonMatching(*) => cx.span_bug(span,
94-
~"Non-matching enum variants in `deriving(" +
95-
name + ")`"),
94+
fmt!("Non-matching enum variants in `deriving(%s)`",
95+
name)),
9696
StaticEnum(*) | StaticStruct(*) => cx.span_bug(span,
97-
~"Static method in `deriving(" +
98-
name + ")`")
97+
fmt!("Static method in `deriving(%s)`",
98+
name))
9999
}
100100

101101
match *all_fields {
@@ -110,8 +110,8 @@ fn cs_clone(
110110
let ident = match o_id {
111111
Some(i) => i,
112112
None => cx.span_bug(span,
113-
~"unnamed field in normal struct \
114-
in `deriving(" + name + ")`")
113+
fmt!("unnamed field in normal struct in `deriving(%s)`",
114+
name))
115115
};
116116
build::Field { ident: ident, ex: subcall(self_f) }
117117
};

0 commit comments

Comments
 (0)