From: Oliver Scherer Date: Mon, 11 Mar 2019 09:25:21 +0000 (+0100) Subject: Make the rustc test runner build again X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=a672abddfa4fa544dc5f4e1fd5fe22244bd8b718;p=rust.git Make the rustc test runner build again --- diff --git a/src/bin/miri-rustc-tests.rs b/src/bin/miri-rustc-tests.rs index cab8d845fc0..43bf466c70e 100644 --- a/src/bin/miri-rustc-tests.rs +++ b/src/bin/miri-rustc-tests.rs @@ -9,19 +9,15 @@ extern crate rustc_interface; extern crate syntax; -use std::path::{PathBuf, Path}; +use std::path::Path; use std::io::Write; use std::sync::{Mutex, Arc}; use std::io; -use rustc::session::Session; use rustc_interface::interface; -use rustc_metadata::cstore::CStore; -use rustc::session::config::{self, Input, ErrorOutputType}; use rustc::hir::{self, itemlikevisit}; use rustc::ty::TyCtxt; -use syntax::ast; use rustc::hir::def_id::LOCAL_CRATE; use miri::MiriConfig; @@ -32,7 +28,7 @@ struct MiriCompilerCalls { } impl rustc_driver::Callbacks for MiriCompilerCalls { - fn after_parsing(&mut self, compiler: &interface::Compiler<'_>) -> bool { + fn after_parsing(&mut self, compiler: &interface::Compiler) -> bool { let attr = ( String::from("miri"), syntax::feature_gate::AttributeType::Whitelisted, @@ -43,7 +39,7 @@ fn after_parsing(&mut self, compiler: &interface::Compiler<'_>) -> bool { true } - fn after_analysis(&mut self, compiler: &interface::Compiler<'_>) -> bool { + fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool { compiler.session().abort_if_errors(); compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| { if std::env::args().any(|arg| arg == "--test") { @@ -146,7 +142,7 @@ fn flush(&mut self) -> io::Result<()> { let buf = BufWriter::default(); let output = buf.clone(); let result = std::panic::catch_unwind(|| { - rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { host_target }, None, Some(Box::new(buf))); + let _ = rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { host_target }, None, Some(Box::new(buf))); }); match result {