about summary refs log tree commit diff
path: root/clippy_lints/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-14 13:42:30 +0000
committerbors <bors@rust-lang.org>2023-09-14 13:42:30 +0000
commiteb545d75689cdebcfd2884292085f470a4702784 (patch)
treea7dd2c89cde5b004858b2ad71900965e92a93770 /clippy_lints/src
parent477a9b88bf31168e747a463b4942a8d64ae5917d (diff)
parent272df70b50992885dcc70b8c34471234985b3be2 (diff)
downloadrust-eb545d75689cdebcfd2884292085f470a4702784.tar.gz
rust-eb545d75689cdebcfd2884292085f470a4702784.zip
Auto merge of #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`
Diffstat (limited to 'clippy_lints/src')
-rw-r--r--clippy_lints/src/derive.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs
index d3311792cfa..2bdac1352dc 100644
--- a/clippy_lints/src/derive.rs
+++ b/clippy_lints/src/derive.rs
@@ -343,7 +343,7 @@ fn check_copy_clone<'tcx>(cx: &LateContext<'tcx>, item: &Item<'_>, trait_ref: &h
     // If the current self type doesn't implement Copy (due to generic constraints), search to see if
     // there's a Copy impl for any instance of the adt.
     if !is_copy(cx, ty) {
-        if ty_subs.non_erasable_generics().next().is_some() {
+        if ty_subs.non_erasable_generics(cx.tcx, ty_adt.did()).next().is_some() {
             let has_copy_impl = cx.tcx.all_local_trait_impls(()).get(&copy_id).map_or(false, |impls| {
                 impls.iter().any(|&id| {
                     matches!(cx.tcx.type_of(id).instantiate_identity().kind(), ty::Adt(adt, _)