about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2023-09-13 13:55:23 +0000
committerDeadbeef <ent3rm4n@gmail.com>2023-09-14 07:34:35 +0000
commita0a801cd3807498bdf6b0d7fd4148fdff9ede4b1 (patch)
treeebc75e409470028f0151c3c2bd28acde2969c3ae /compiler/rustc_codegen_gcc/src
parent7e0261e7ea2085bdc0bc3d0fd6776bf343473858 (diff)
downloadrust-a0a801cd3807498bdf6b0d7fd4148fdff9ede4b1.tar.gz
rust-a0a801cd3807498bdf6b0d7fd4148fdff9ede4b1.zip
treat host effect params as erased generics in codegen
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
-rw-r--r--compiler/rustc_codegen_gcc/src/callee.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/callee.rs b/compiler/rustc_codegen_gcc/src/callee.rs
index a96bd66ba79..9fc77627b1b 100644
--- a/compiler/rustc_codegen_gcc/src/callee.rs
+++ b/compiler/rustc_codegen_gcc/src/callee.rs
@@ -100,7 +100,7 @@ pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>)
             // whether we are sharing generics or not. The important thing here is
             // that the visibility we apply to the declaration is the same one that
             // has been applied to the definition (wherever that definition may be).
-            let is_generic = instance.args.non_erasable_generics().next().is_some();
+            let is_generic = instance.args.non_erasable_generics(tcx, instance.def_id()).next().is_some();
 
             if is_generic {
                 // This is a monomorphization. Its expected visibility depends