Skip to content

Commit a672abd

Browse files
committed
Make the rustc test runner build again
1 parent 2c7357d commit a672abd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/bin/miri-rustc-tests.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@ extern crate rustc_codegen_utils;
99
extern crate rustc_interface;
1010
extern crate syntax;
1111

12-
use std::path::{PathBuf, Path};
12+
use std::path::Path;
1313
use std::io::Write;
1414
use std::sync::{Mutex, Arc};
1515
use std::io;
1616

1717

18-
use rustc::session::Session;
1918
use rustc_interface::interface;
20-
use rustc_metadata::cstore::CStore;
21-
use rustc::session::config::{self, Input, ErrorOutputType};
2219
use rustc::hir::{self, itemlikevisit};
2320
use rustc::ty::TyCtxt;
24-
use syntax::ast;
2521
use rustc::hir::def_id::LOCAL_CRATE;
2622

2723
use miri::MiriConfig;
@@ -32,7 +28,7 @@ struct MiriCompilerCalls {
3228
}
3329

3430
impl rustc_driver::Callbacks for MiriCompilerCalls {
35-
fn after_parsing(&mut self, compiler: &interface::Compiler<'_>) -> bool {
31+
fn after_parsing(&mut self, compiler: &interface::Compiler) -> bool {
3632
let attr = (
3733
String::from("miri"),
3834
syntax::feature_gate::AttributeType::Whitelisted,
@@ -43,7 +39,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
4339
true
4440
}
4541

46-
fn after_analysis(&mut self, compiler: &interface::Compiler<'_>) -> bool {
42+
fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool {
4743
compiler.session().abort_if_errors();
4844
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
4945
if std::env::args().any(|arg| arg == "--test") {
@@ -146,7 +142,7 @@ fn main() {
146142
let buf = BufWriter::default();
147143
let output = buf.clone();
148144
let result = std::panic::catch_unwind(|| {
149-
rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { host_target }, None, Some(Box::new(buf)));
145+
let _ = rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { host_target }, None, Some(Box::new(buf)));
150146
});
151147

152148
match result {

0 commit comments

Comments
 (0)