diff options
| author | Michael Goulet <michael@errs.io> | 2025-04-28 14:40:16 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-05-05 13:17:35 +0000 |
| commit | 833c212b81d38ce4fb10b7084549291052878822 (patch) | |
| tree | 202d16528ee4f5449723600422add8ef5faa08ef /compiler/rustc_monomorphize | |
| parent | 3a1ee645cad501e2fd766bbacea5654a795f352b (diff) | |
| download | rust-833c212b81d38ce4fb10b7084549291052878822.tar.gz rust-833c212b81d38ce4fb10b7084549291052878822.zip | |
Rename Instance::new to Instance::new_raw and add a note that it is raw
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 1e3744e19f5..c6a81e60b2b 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -931,7 +931,7 @@ fn visit_instance_use<'tcx>( // We explicitly skip this otherwise to ensure we get a linker error // if anyone tries to call this intrinsic and the codegen backend did not // override the implementation. - let instance = ty::Instance::new(instance.def_id(), instance.args); + let instance = ty::Instance::new_raw(instance.def_id(), instance.args); if tcx.should_codegen_locally(instance) { output.push(create_fn_mono_item(tcx, instance, source)); } @@ -1520,7 +1520,7 @@ impl<'v> RootCollector<'_, 'v> { ty::Closure(def_id, args) | ty::Coroutine(def_id, args) | ty::CoroutineClosure(def_id, args) => { - Instance::new(def_id, self.tcx.erase_regions(args)) + Instance::new_raw(def_id, self.tcx.erase_regions(args)) } _ => unreachable!(), }; |
