]> git.lizzy.rs Git - rust.git/commitdiff
Make the rustc test runner build again
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Mon, 11 Mar 2019 09:25:21 +0000 (10:25 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Mon, 11 Mar 2019 09:25:21 +0000 (10:25 +0100)
src/bin/miri-rustc-tests.rs

index cab8d845fc0d14c367be127dfb280eac29355e21..43bf466c70ee3089ccd8f3ad2530d1f3f34a9e55 100644 (file)
@@ -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 {