Skip to content

Commit 758d784

Browse files
committed
Auto merge of #135947 - matthiaskrgr:rollup-k9jpfls, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #135073 (Implement `ByteStr` and `ByteString` types) - #135492 (Add missing check for async body when suggesting await on futures.) - #135766 (handle global trait bounds defining assoc types) - #135880 (Get rid of RunCompiler) - #135908 (rustc_codegen_llvm: remove outdated asm-to-obj codegen note) - #135911 (Allow `arena_cache` queries to return `Option<&'tcx T>`) - #135920 (simplify parse_format::Parser::ws by using next_if) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0d42c63 + bc8069a commit 758d784

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

src/bin/miri.rs

+6-19
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::ops::Range;
3030
use std::path::PathBuf;
3131
use std::str::FromStr;
3232
use std::sync::atomic::{AtomicI32, Ordering};
33-
use std::sync::{Arc, Once};
33+
use std::sync::Once;
3434

3535
use miri::{
3636
BacktraceStyle, BorrowTrackerMethod, MiriConfig, MiriEntryFnType,ProvenanceMode, RetagFields, ValidationMode,
@@ -370,13 +370,10 @@ fn init_late_loggers(early_dcx: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
370370
fn run_compiler_and_exit(
371371
args: &[String],
372372
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
373-
using_internal_features: Arc<std::sync::atomic::AtomicBool>,
374373
) -> ! {
375374
// Invoke compiler, and handle return code.
376375
let exit_code = rustc_driver::catch_with_exit_code(move || {
377-
rustc_driver::RunCompiler::new(args, callbacks)
378-
.set_using_internal_features(using_internal_features)
379-
.run();
376+
rustc_driver::run_compiler(args, callbacks);
380377
Ok(())
381378
});
382379
std::process::exit(exit_code)
@@ -467,8 +464,7 @@ fn main() {
467464
// If the environment asks us to actually be rustc, then do that.
468465
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
469466
// Earliest rustc setup.
470-
let using_internal_features =
471-
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
467+
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
472468
rustc_driver::init_rustc_env_logger(&early_dcx);
473469

474470
let target_crate = if crate_kind == "target" {
@@ -492,16 +488,11 @@ fn main() {
492488
}
493489

494490
// We cannot use `rustc_driver::main` as we want it to use `args` as the CLI arguments.
495-
run_compiler_and_exit(
496-
&args,
497-
&mut MiriBeRustCompilerCalls { target_crate },
498-
using_internal_features,
499-
)
491+
run_compiler_and_exit(&args, &mut MiriBeRustCompilerCalls { target_crate })
500492
}
501493

502494
// Add an ICE bug report hook.
503-
let using_internal_features =
504-
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
495+
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
505496

506497
// Init loggers the Miri way.
507498
init_early_loggers(&early_dcx);
@@ -735,9 +726,5 @@ fn main() {
735726

736727
debug!("rustc arguments: {:?}", rustc_args);
737728
debug!("crate arguments: {:?}", miri_config.args);
738-
run_compiler_and_exit(
739-
&rustc_args,
740-
&mut MiriCompilerCalls::new(miri_config, many_seeds),
741-
using_internal_features,
742-
)
729+
run_compiler_and_exit(&rustc_args, &mut MiriCompilerCalls::new(miri_config, many_seeds))
743730
}

0 commit comments

Comments
 (0)