Skip to content

Commit

Permalink
fix fallout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jan 18, 2020
1 parent 5aaf0be commit a67d36f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/librustc_expand/mut_visit/tests.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_expand/parse/lexer/tests.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_expand/parse/tests.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_expand/tests.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#![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;
#[macro_use] extern crate rustc_session;
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) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui-fulldeps/mod_dir_path_canonicalized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions src/test/ui-fulldeps/pprust-expr-roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<P<Expr>> {
Expand Down

0 comments on commit a67d36f

Please sign in to comment.