diff options
| author | bors <bors@rust-lang.org> | 2015-11-06 11:28:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-06 11:28:07 +0000 |
| commit | 2f59977d96ebe5cf5fc000bf27e3f663cad3250c (patch) | |
| tree | 6ad58e0e2ca7afb3d8214596fc13eace12a4d00d /src/libsyntax | |
| parent | 6878fce9c707dd7449df1981303dfc2c1fedabab (diff) | |
| parent | 63576c23e41092ae16c57e15977bf10e72327799 (diff) | |
| download | rust-2f59977d96ebe5cf5fc000bf27e3f663cad3250c.tar.gz rust-2f59977d96ebe5cf5fc000bf27e3f663cad3250c.zip | |
Auto merge of #29615 - steveklabnik:lol_strings, r=alexcrichton
&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index b1b4605d5ec..512f71fd4c1 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -400,9 +400,7 @@ pub fn expand_item_mac(it: P<ast::Item>, } MacroRulesTT => { if ident.name == parse::token::special_idents::invalid.name { - fld.cx.span_err(path_span, - &format!("macro_rules! expects an ident argument") - ); + fld.cx.span_err(path_span, "macro_rules! expects an ident argument"); return SmallVector::zero(); } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2401f6be78f..7da03c7482c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1843,7 +1843,7 @@ impl<'a> Parser<'a> { }); } _ => { - return Err(self.fatal(&format!("expected a lifetime name"))); + return Err(self.fatal("expected a lifetime name")); } } } |
