diff --git a/src/librustc_expand/mut_visit/tests.rs b/src/librustc_expand/mut_visit/tests.rs index 003ce0fcb1fd4..49b9a1b1025ab 100644 --- a/src/librustc_expand/mut_visit/tests.rs +++ b/src/librustc_expand/mut_visit/tests.rs @@ -1,8 +1,8 @@ use crate::tests::{matches_codepattern, string_to_crate}; +use rustc_ast_pretty::pprust; use syntax::ast::{self, Ident}; use syntax::mut_visit::{self, MutVisitor}; -use syntax::print::pprust; use syntax::with_default_globals; // This version doesn't care about getting comments or doc-strings in. diff --git a/src/librustc_expand/parse/lexer/tests.rs b/src/librustc_expand/parse/lexer/tests.rs index 2ef81d80a1412..c486839dad506 100644 --- a/src/librustc_expand/parse/lexer/tests.rs +++ b/src/librustc_expand/parse/lexer/tests.rs @@ -1,10 +1,10 @@ use rustc_data_structures::sync::Lrc; use rustc_errors::{emitter::EmitterWriter, Handler}; use rustc_parse::lexer::StringReader; +use rustc_session::parse::ParseSess; use rustc_span::source_map::{FilePathMapping, SourceMap}; use rustc_span::symbol::Symbol; use rustc_span::{BytePos, Span}; -use syntax::sess::ParseSess; use syntax::token::{self, Token, TokenKind}; use syntax::util::comments::is_doc_comment; use syntax::with_default_globals; diff --git a/src/librustc_expand/parse/tests.rs b/src/librustc_expand/parse/tests.rs index b79e2894126dd..3641f03cb30c5 100644 --- a/src/librustc_expand/parse/tests.rs +++ b/src/librustc_expand/parse/tests.rs @@ -1,14 +1,14 @@ use crate::tests::{matches_codepattern, string_to_stream, with_error_checking_parse}; +use rustc_ast_pretty::pprust::item_to_string; use rustc_errors::PResult; use rustc_parse::new_parser_from_source_str; +use rustc_session::parse::ParseSess; use rustc_span::source_map::FilePathMapping; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::{BytePos, FileName, Pos, Span}; use syntax::ast::{self, Name, PatKind}; -use syntax::print::pprust::item_to_string; use syntax::ptr::P; -use syntax::sess::ParseSess; use syntax::token::{self, Token}; use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree}; use syntax::visit; diff --git a/src/librustc_expand/tests.rs b/src/librustc_expand/tests.rs index 82ab74ac15004..4ed60465f24f2 100644 --- a/src/librustc_expand/tests.rs +++ b/src/librustc_expand/tests.rs @@ -1,8 +1,8 @@ use rustc_parse::{new_parser_from_source_str, parser::Parser, source_file_to_stream}; +use rustc_session::parse::ParseSess; use rustc_span::source_map::{FilePathMapping, SourceMap}; use rustc_span::{BytePos, MultiSpan, Span}; use syntax::ast; -use syntax::sess::ParseSess; use syntax::tokenstream::TokenStream; use syntax::with_default_globals; diff --git a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs index 725c350fe4e22..fbdad29d6494f 100644 --- a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs +++ b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs @@ -1,6 +1,7 @@ #![feature(box_syntax, plugin, plugin_registrar, rustc_private)] #![crate_type = "dylib"] +extern crate rustc_ast_pretty; extern crate rustc_driver; extern crate rustc_hir; #[macro_use] extern crate rustc_lint; @@ -8,13 +9,13 @@ extern crate rustc_hir; extern crate rustc_span; extern crate syntax; +use rustc_ast_pretty::pprust; use rustc_hir::intravisit; use rustc_hir as hir; use rustc_hir::Node; use rustc_lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext}; use rustc_driver::plugin::Registry; use rustc_span::source_map; -use syntax::print::pprust; #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { diff --git a/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs b/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs index 2b4a9fb21e4c7..be4b49ada02c7 100644 --- a/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs +++ b/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs @@ -6,12 +6,13 @@ extern crate syntax; extern crate rustc_parse; +extern crate rustc_session; extern crate rustc_span; use rustc_parse::new_parser_from_file; +use rustc_session::parse::ParseSess; use rustc_span::source_map::FilePathMapping; use std::path::Path; -use syntax::sess::ParseSess; #[path = "mod_dir_simple/test.rs"] mod gravy; diff --git a/src/test/ui-fulldeps/pprust-expr-roundtrip.rs b/src/test/ui-fulldeps/pprust-expr-roundtrip.rs index 04d1054e2877f..0f6a88b2691a8 100644 --- a/src/test/ui-fulldeps/pprust-expr-roundtrip.rs +++ b/src/test/ui-fulldeps/pprust-expr-roundtrip.rs @@ -19,19 +19,21 @@ #![feature(rustc_private)] +extern crate rustc_ast_pretty; extern crate rustc_data_structures; extern crate syntax; extern crate rustc_parse; +extern crate rustc_session; extern crate rustc_span; +use rustc_ast_pretty::pprust; use rustc_data_structures::thin_vec::ThinVec; use rustc_parse::new_parser_from_source_str; +use rustc_session::parse::ParseSess; use rustc_span::source_map::{Spanned, DUMMY_SP, FileName}; use rustc_span::source_map::FilePathMapping; use syntax::ast::*; -use syntax::sess::ParseSess; use syntax::mut_visit::{self, MutVisitor, visit_clobber}; -use syntax::print::pprust; use syntax::ptr::P; fn parse_expr(ps: &ParseSess, src: &str) -> Option> {