Round 3 test fixes and conflicts
This commit is contained in:
@@ -117,7 +117,7 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree
|
||||
None => self.p.span_fatal(
|
||||
self.p.span,
|
||||
&format!("expected item, found `{}`",
|
||||
self.p.this_token_to_string())[]
|
||||
self.p.this_token_to_string())
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||
cx.span_err(sp,
|
||||
&format!("couldn't read {}: {}",
|
||||
file.display(),
|
||||
e)[]);
|
||||
e));
|
||||
return DummyResult::expr(sp);
|
||||
}
|
||||
Ok(bytes) => bytes,
|
||||
@@ -159,7 +159,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||
Err(_) => {
|
||||
cx.span_err(sp,
|
||||
&format!("{} wasn't a utf-8 file",
|
||||
file.display())[]);
|
||||
file.display()));
|
||||
return DummyResult::expr(sp);
|
||||
}
|
||||
}
|
||||
@@ -175,7 +175,7 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||
match File::open(&file).read_to_end() {
|
||||
Err(e) => {
|
||||
cx.span_err(sp,
|
||||
&format!("couldn't read {}: {}", file.display(), e)[]);
|
||||
&format!("couldn't read {}: {}", file.display(), e));
|
||||
return DummyResult::expr(sp);
|
||||
}
|
||||
Ok(bytes) => {
|
||||
|
||||
@@ -229,7 +229,7 @@ pub fn nameize(p_s: &ParseSess, ms: &[TokenTree], res: &[Rc<NamedMatch>])
|
||||
p_s.span_diagnostic
|
||||
.span_fatal(sp,
|
||||
&format!("duplicated bind name: {}",
|
||||
&string)[])
|
||||
&string))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -533,7 +533,7 @@ pub fn parse_nt(p: &mut Parser, sp: Span, name: &str) -> Nonterminal {
|
||||
_ => {
|
||||
let token_str = pprust::token_to_string(&p.token);
|
||||
p.fatal(&format!("expected ident, found {}",
|
||||
&token_str[..])[])
|
||||
&token_str[..]))
|
||||
}
|
||||
},
|
||||
"path" => {
|
||||
@@ -542,7 +542,7 @@ pub fn parse_nt(p: &mut Parser, sp: Span, name: &str) -> Nonterminal {
|
||||
"meta" => token::NtMeta(p.parse_meta_item()),
|
||||
_ => {
|
||||
p.span_fatal_help(sp,
|
||||
&format!("invalid fragment specifier `{}`", name)[],
|
||||
&format!("invalid fragment specifier `{}`", name),
|
||||
"valid fragment specifiers are `ident`, `block`, \
|
||||
`stmt`, `expr`, `pat`, `ty`, `path`, `meta`, `tt` \
|
||||
and `item`")
|
||||
|
||||
@@ -123,8 +123,8 @@ impl TTMacroExpander for MacroRulesMacroExpander {
|
||||
self.name,
|
||||
self.imported_from,
|
||||
arg,
|
||||
&self.lhses[],
|
||||
&self.rhses[])
|
||||
&self.lhses,
|
||||
&self.rhses)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ fn generic_extension<'cx>(cx: &'cx ExtCtxt,
|
||||
match **lhs {
|
||||
MatchedNonterminal(NtTT(ref lhs_tt)) => {
|
||||
let lhs_tt = match **lhs_tt {
|
||||
TtDelimited(_, ref delim) => &delim.tts[],
|
||||
TtDelimited(_, ref delim) => &delim.tts[..],
|
||||
_ => cx.span_fatal(sp, "malformed macro lhs")
|
||||
};
|
||||
// `None` is because we're not interpolating
|
||||
|
||||
@@ -309,7 +309,7 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
|
||||
r.sp_diag.span_fatal(
|
||||
r.cur_span, /* blame the macro writer */
|
||||
&format!("variable '{:?}' is still repeating at this depth",
|
||||
token::get_ident(ident))[]);
|
||||
token::get_ident(ident)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user