Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 14, 2024
1 parent 7738929 commit 19bf2af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_smir/src/rustc_internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ macro_rules! run_driver {
($args:expr, $callback:expr $(, $with_tcx:ident)?) => {{
use rustc_driver::{Callbacks, Compilation, RunCompiler};
use rustc_middle::ty::TyCtxt;
use rustc_interface::{interface, Queries};
use rustc_interface::interface;
use stable_mir::CompilerError;
use std::ops::ControlFlow;

Expand Down
9 changes: 4 additions & 5 deletions tests/ui-fulldeps/run-compiler-twice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf, linker: Option<&Path
};

interface::run_compiler(config, |compiler| {
let linker = compiler.enter(|queries| {
queries.global_ctxt().enter(|tcx| {
let _ = tcx.analysis(());
Linker::codegen_and_build_linker(tcx, &*compiler.codegen_backend)
})
let krate = rustc_interface::passes::parse(sess);
let linker = rustc_interface::create_and_enter_global_ctxt(&compiler, krate, |tcx| {
let _ = tcx.analysis(());
Linker::codegen_and_build_linker(tcx, &*compiler.codegen_backend)
});
linker.link(&compiler.sess, &*compiler.codegen_backend);
});
Expand Down

0 comments on commit 19bf2af

Please sign in to comment.