diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-17 14:04:36 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-21 12:16:46 +0000 |
| commit | a8e86f0f816c9666915c73e80969dbf85a5afd56 (patch) | |
| tree | 91270a89ac1fe7a4d87e9c3785fd6bb69db8a6c7 /src/test/compile-fail-fulldeps | |
| parent | c9935e4a377e6055bc9f52fd7f130c55728736d4 (diff) | |
| download | rust-a8e86f0f816c9666915c73e80969dbf85a5afd56.tar.gz rust-a8e86f0f816c9666915c73e80969dbf85a5afd56.zip | |
Fix fallout in `rustdoc` and tests.
Diffstat (limited to 'src/test/compile-fail-fulldeps')
| -rw-r--r-- | src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs | 11 | ||||
| -rw-r--r-- | src/test/compile-fail-fulldeps/qquote.rs | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs index 8ea131da338..8647797270f 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs @@ -36,7 +36,7 @@ impl LintPass for Pass { impl EarlyLintPass for Pass { fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { - if it.ident.name.as_str() == "lintme" { + if it.ident.name == "lintme" { cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"); } } diff --git a/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs index 409f9dbf03c..dc88bfc4059 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs @@ -19,8 +19,9 @@ extern crate rustc_plugin; use syntax::ast::{self, Item, MetaItem, ItemKind}; use syntax::ext::base::*; -use syntax::parse::{self, token}; +use syntax::parse; use syntax::ptr::P; +use syntax::symbol::Symbol; use syntax::tokenstream::TokenTree; use syntax_pos::Span; use rustc_plugin::Registry; @@ -34,11 +35,11 @@ pub fn plugin_registrar(reg: &mut Registry) { reg.register_macro("make_a_1", expand_make_a_1); reg.register_macro("identity", expand_identity); reg.register_syntax_extension( - token::intern("into_multi_foo"), + Symbol::intern("into_multi_foo"), // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. MultiModifier(Box::new(expand_into_foo_multi))); reg.register_syntax_extension( - token::intern("duplicate"), + Symbol::intern("duplicate"), // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. MultiDecorator(Box::new(expand_duplicate))); } @@ -102,9 +103,9 @@ fn expand_duplicate(cx: &mut ExtCtxt, push: &mut FnMut(Annotatable)) { let copy_name = match mi.node { - ast::MetaItemKind::List(_, ref xs) => { + ast::MetaItemKind::List(ref xs) => { if let Some(word) = xs[0].word() { - token::str_to_ident(&word.name()) + ast::Ident::with_empty_ctxt(word.name()) } else { cx.span_err(mi.span, "Expected word"); return; diff --git a/src/test/compile-fail-fulldeps/qquote.rs b/src/test/compile-fail-fulldeps/qquote.rs index 4a7033d44b8..8acab3369e4 100644 --- a/src/test/compile-fail-fulldeps/qquote.rs +++ b/src/test/compile-fail-fulldeps/qquote.rs @@ -16,8 +16,8 @@ extern crate syntax; extern crate syntax_pos; use syntax::ast; -use syntax::parse; use syntax::print::pprust; +use syntax::symbol::Symbol; use syntax_pos::DUMMY_SP; fn main() { @@ -30,7 +30,7 @@ fn main() { cx.bt_push(syntax::codemap::ExpnInfo { call_site: DUMMY_SP, callee: syntax::codemap::NameAndSpan { - format: syntax::codemap::MacroBang(parse::token::intern("")), + format: syntax::codemap::MacroBang(Symbol::intern("")), allow_internal_unstable: false, span: None, } |
