From 51deb4fedbdab4b9b5a7610985c0be54e89cae73 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Wed, 22 Jun 2016 12:50:19 -0400 Subject: [PATCH] Address more travis errors --- src/libsyntax/codemap.rs | 1 + src/libsyntax/ext/expand.rs | 2 +- src/libsyntax/parse/lexer/mod.rs | 2 +- src/libsyntax/parse/mod.rs | 3 ++- src/libsyntax/print/pprust.rs | 3 ++- src/test/compile-fail/bad-format-args.rs | 6 +++--- src/test/run-make/execution-engine/test.rs | 4 +++- src/test/run-make/issue-19371/foo.rs | 3 ++- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 0dc67ef6d377..2188dc36ec84 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -827,6 +827,7 @@ impl CodeMapper for CodeMap { #[cfg(test)] mod tests { use super::*; + use syntax_pos::*; #[test] fn t1 () { diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index fabe9a1bc027..aa5fe4fe2fa1 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1229,7 +1229,7 @@ mod tests { use super::{PatIdentFinder, IdentRenamer, PatIdentRenamer, ExpansionConfig}; use ast; use ast::Name; - use codemap; + use syntax_pos; use ext::base::{ExtCtxt, DummyMacroLoader}; use ext::mtwt; use fold::Folder; diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index f3d8738e95b7..d9d4bb504a77 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1677,7 +1677,7 @@ fn ident_continue(c: Option) -> bool { mod tests { use super::*; - use codemap::{BytePos, Span, NO_EXPANSION}; + use syntax_pos::{BytePos, Span, NO_EXPANSION}; use codemap::CodeMap; use errors; use parse::token; diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 60cc2f659edf..0796f298be1a 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -662,7 +662,8 @@ pub fn integer_lit(s: &str, mod tests { use super::*; use std::rc::Rc; - use syntax_pos::{Span, BytePos, Pos, Spanned, NO_EXPANSION}; + use syntax_pos::{Span, BytePos, Pos, NO_EXPANSION}; + use codemap::Spanned; use ast::{self, TokenTree, PatKind}; use abi::Abi; use attr::{first_attr_value_str_by_name, AttrMetaMethods}; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 40150ebf9d7c..d254d3a71cf7 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -3105,6 +3105,7 @@ mod tests { use ast; use codemap; use parse::token; + use syntax_pos; #[test] fn test_fun_to_string() { @@ -3126,7 +3127,7 @@ mod tests { fn test_variant_to_string() { let ident = token::str_to_ident("principal_skinner"); - let var = syntax_pos::respan(syntax_pos::DUMMY_SP, ast::Variant_ { + let var = codemap::respan(syntax_pos::DUMMY_SP, ast::Variant_ { name: ident, attrs: Vec::new(), // making this up as I go.... ? diff --git a/src/test/compile-fail/bad-format-args.rs b/src/test/compile-fail/bad-format-args.rs index 816c696a8956..5ac1a6a0373a 100644 --- a/src/test/compile-fail/bad-format-args.rs +++ b/src/test/compile-fail/bad-format-args.rs @@ -9,11 +9,11 @@ // except according to those terms. // error-pattern: requires at least a format string argument -// error-pattern: bad-format-args.rs:19:5: 19:15 note: in this expansion +// error-pattern: bad-format-args.rs:19:5: 19:15: note: in this expansion // error-pattern: expected token: `,` -// error-pattern: bad-format-args.rs:20:5: 20:19 note: in this expansion -// error-pattern: bad-format-args.rs:21:5: 21:22 note: in this expansion +// error-pattern: bad-format-args.rs:20:5: 20:19: note: in this expansion +// error-pattern: bad-format-args.rs:21:5: 21:22: note: in this expansion fn main() { format!(); diff --git a/src/test/run-make/execution-engine/test.rs b/src/test/run-make/execution-engine/test.rs index 8a7959212f54..a94b2a85c775 100644 --- a/src/test/run-make/execution-engine/test.rs +++ b/src/test/run-make/execution-engine/test.rs @@ -18,6 +18,8 @@ extern crate rustc_lint; extern crate rustc_llvm as llvm; extern crate rustc_metadata; extern crate rustc_resolve; +extern crate rustc_errors; +extern crate rustc_errors as errors; #[macro_use] extern crate syntax; use std::ffi::{CStr, CString}; @@ -38,7 +40,7 @@ use rustc_metadata::creader::read_local_crates; use rustc_metadata::cstore::CStore; use libc::c_void; -use syntax::diagnostics::registry::Registry; +use rustc_errors::registry::Registry; use syntax::parse::token; fn main() { diff --git a/src/test/run-make/issue-19371/foo.rs b/src/test/run-make/issue-19371/foo.rs index 41d250eadec4..aa3495ec5eeb 100644 --- a/src/test/run-make/issue-19371/foo.rs +++ b/src/test/run-make/issue-19371/foo.rs @@ -14,6 +14,7 @@ extern crate rustc; extern crate rustc_driver; extern crate rustc_lint; extern crate rustc_metadata; +extern crate rustc_errors; extern crate syntax; use rustc::dep_graph::DepGraph; @@ -21,7 +22,7 @@ use rustc::session::{build_session, Session}; use rustc::session::config::{basic_options, build_configuration, Input, OutputType}; use rustc_driver::driver::{compile_input, CompileController, anon_src}; use rustc_metadata::cstore::CStore; -use syntax::diagnostics::registry::Registry; +use rustc_errors::registry::Registry; use syntax::parse::token; use std::path::PathBuf;