parent
491fb01af5
commit
2c2e7f4d5f
@ -201,7 +201,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
||||
if let ty::TypeVariants::TyAdt(def, ..) = ty.sty {
|
||||
if let Some(span) = cx.tcx.hir.span_if_local(def.did) {
|
||||
let param_env = ty::ParamEnv::empty();
|
||||
if param_env.can_type_implement_copy(cx.tcx, ty, span).is_ok() {
|
||||
if param_env.can_type_implement_copy(cx.tcx, ty).is_ok() {
|
||||
db.span_help(span, "consider marking this type as Copy");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user