Skip to content

Commit d7766ff

Browse files
committed
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`.
1 parent 8028885 commit d7766ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>)
100100
// whether we are sharing generics or not. The important thing here is
101101
// that the visibility we apply to the declaration is the same one that
102102
// has been applied to the definition (wherever that definition may be).
103-
let is_generic = instance.args.non_erasable_generics().next().is_some();
103+
let is_generic = instance.args.non_erasable_generics(tcx, instance.def_id()).next().is_some();
104104

105105
if is_generic {
106106
// This is a monomorphization. Its expected visibility depends

0 commit comments

Comments
 (0)