diff options
| author | bors <bors@rust-lang.org> | 2015-03-05 21:03:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-05 21:03:10 +0000 |
| commit | b0746ff19b3bc204215f04bbb5756159f9bc5c92 (patch) | |
| tree | 2116c5865229d3d238832e50c99ad9baebe63087 /src/libsyntax/ext | |
| parent | f0c74f85f363a8081b31f9ab696463717ce312d5 (diff) | |
| parent | 340d1cc7d701bf1c5bae6c2ad5b097462c5d1a7c (diff) | |
| download | rust-b0746ff19b3bc204215f04bbb5756159f9bc5c92.tar.gz rust-b0746ff19b3bc204215f04bbb5756159f9bc5c92.zip | |
Auto merge of #23031 - Manishearth:rollup, r=Manishearth
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index f6bdd693cfa..a8c35c1fdb1 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -753,6 +753,10 @@ impl<'a> ExtCtxt<'a> { self.print_backtrace(); self.parse_sess.span_diagnostic.span_help(sp, msg); } + pub fn fileline_help(&self, sp: Span, msg: &str) { + self.print_backtrace(); + self.parse_sess.span_diagnostic.fileline_help(sp, msg); + } pub fn bug(&self, msg: &str) -> ! { self.print_backtrace(); self.parse_sess.span_diagnostic.handler().bug(msg); diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index bea57ae14e4..8896a8e0c4f 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -571,7 +571,7 @@ fn contains_macro_use(fld: &mut MacroExpander, attrs: &[ast::Attribute]) -> bool fld.cx.span_warn(attr.span, "macro_escape is a deprecated synonym for macro_use"); is_use = true; if let ast::AttrInner = attr.node.style { - fld.cx.span_help(attr.span, "consider an outer attribute, \ + fld.cx.fileline_help(attr.span, "consider an outer attribute, \ #[macro_use] mod ..."); } }; diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 2599a53e313..737648cd90c 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -676,9 +676,10 @@ fn expr_mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> P<ast::Expr> { token::FatArrow => "FatArrow", token::Pound => "Pound", token::Dollar => "Dollar", + token::Question => "Question", token::Underscore => "Underscore", token::Eof => "Eof", - _ => panic!(), + _ => panic!("unhandled token in quote!"), }; mk_token_path(cx, sp, name) } |
