Skip to content

Commit 272df70

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 b643f20 commit 272df70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ fn check_copy_clone<'tcx>(cx: &LateContext<'tcx>, item: &Item<'_>, trait_ref: &h
343343
// If the current self type doesn't implement Copy (due to generic constraints), search to see if
344344
// there's a Copy impl for any instance of the adt.
345345
if !is_copy(cx, ty) {
346-
if ty_subs.non_erasable_generics().next().is_some() {
346+
if ty_subs.non_erasable_generics(cx.tcx, ty_adt.did()).next().is_some() {
347347
let has_copy_impl = cx.tcx.all_local_trait_impls(()).get(&copy_id).map_or(false, |impls| {
348348
impls.iter().any(|&id| {
349349
matches!(cx.tcx.type_of(id).instantiate_identity().kind(), ty::Adt(adt, _)

0 commit comments

Comments
 (0)