Skip to content

Commit eb545d7

Browse files
committed
Auto merge of rust-lang#115817 - fee1-dead-contrib:fix-codegen, r=oli-obk
treat host effect params as erased 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`. r? `@oli-obk`
2 parents 477a9b8 + 272df70 commit eb545d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/derive.rs

+1-1
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)