Skip to content

Commit ce460dc

Browse files
committed
Auto merge of rust-lang#105102 - compiler-errors:copy-impl-considering-regions, r=lcnr
Check ADT fields for copy implementations considering regions Fixes rust-lang#88901 r? `@ghost`
2 parents 11611b0 + 93d0f47 commit ce460dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/needless_pass_by_value.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use rustc_span::symbol::kw;
2424
use rustc_span::{sym, Span};
2525
use rustc_target::spec::abi::Abi;
2626
use rustc_trait_selection::traits;
27-
use rustc_trait_selection::traits::misc::can_type_implement_copy;
27+
use rustc_trait_selection::traits::misc::type_allowed_to_implement_copy;
2828
use std::borrow::Cow;
2929

3030
declare_clippy_lint! {
@@ -200,7 +200,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
200200
let sugg = |diag: &mut Diagnostic| {
201201
if let ty::Adt(def, ..) = ty.kind() {
202202
if let Some(span) = cx.tcx.hir().span_if_local(def.did()) {
203-
if can_type_implement_copy(
203+
if type_allowed_to_implement_copy(
204204
cx.tcx,
205205
cx.param_env,
206206
ty,

0 commit comments

Comments
 (0)