diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-30 20:41:02 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-01-13 23:06:29 +0000 |
| commit | 8cf7f40a895f476ecd3216b11ff673389135b652 (patch) | |
| tree | 5d563f3db175e808bc4ca5679e22ee11d4086743 /src/tools/clippy | |
| parent | 0b90256ada21c6a81b4c18f2c7a23151ab5fc232 (diff) | |
| download | rust-8cf7f40a895f476ecd3216b11ff673389135b652.tar.gz rust-8cf7f40a895f476ecd3216b11ff673389135b652.zip | |
Check ADT fields for copy implementations considering regions
Diffstat (limited to 'src/tools/clippy')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs b/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs index 1249db5dc47..8c9d4c5cfe6 100644 --- a/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs +++ b/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs @@ -24,7 +24,7 @@ use rustc_span::symbol::kw; use rustc_span::{sym, Span}; use rustc_target::spec::abi::Abi; use rustc_trait_selection::traits; -use rustc_trait_selection::traits::misc::can_type_implement_copy; +use rustc_trait_selection::traits::misc::type_allowed_to_implement_copy; use std::borrow::Cow; declare_clippy_lint! { @@ -200,7 +200,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue { let sugg = |diag: &mut Diagnostic| { if let ty::Adt(def, ..) = ty.kind() { if let Some(span) = cx.tcx.hir().span_if_local(def.did()) { - if can_type_implement_copy( + if type_allowed_to_implement_copy( cx.tcx, cx.param_env, ty, |
