about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-14 14:28:28 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-14 14:53:59 +0000
commitb0cd37ea0e7f80fca19f4edcd26fee5d6e258c73 (patch)
treea2f8687961bcb4c6d96a72fd310d3b983f5c6e47
parent77389290975e6be9a03e7539cf6efd45dcbc65ac (diff)
downloadrust-b0cd37ea0e7f80fca19f4edcd26fee5d6e258c73.tar.gz
rust-b0cd37ea0e7f80fca19f4edcd26fee5d6e258c73.zip
Fix tests
-rw-r--r--compiler/rustc_smir/src/rustc_internal/mod.rs2
-rw-r--r--tests/ui-fulldeps/run-compiler-twice.rs9
2 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_smir/src/rustc_internal/mod.rs b/compiler/rustc_smir/src/rustc_internal/mod.rs
index 614c9169d66..3c06442b7c5 100644
--- a/compiler/rustc_smir/src/rustc_internal/mod.rs
+++ b/compiler/rustc_smir/src/rustc_internal/mod.rs
@@ -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;
 
diff --git a/tests/ui-fulldeps/run-compiler-twice.rs b/tests/ui-fulldeps/run-compiler-twice.rs
index d4c9fd019b0..bcc235e58ed 100644
--- a/tests/ui-fulldeps/run-compiler-twice.rs
+++ b/tests/ui-fulldeps/run-compiler-twice.rs
@@ -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(&compiler.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);
     });