mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-22 12:43:18 +00:00
iterate List by value
This commit is contained in:
parent
b3a690f5a1
commit
e820a03d1c
1 changed files with 1 additions and 2 deletions
|
@ -111,7 +111,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
|||
|
||||
let fn_def_id = cx.tcx.hir().local_def_id(hir_id);
|
||||
|
||||
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.iter().copied())
|
||||
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.iter())
|
||||
.filter(|p| !p.is_global())
|
||||
.filter_map(|obligation| {
|
||||
if let ty::PredicateKind::Trait(poly_trait_ref, _) = obligation.predicate.kind() {
|
||||
|
@ -179,7 +179,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
|||
.substs
|
||||
.iter()
|
||||
.skip(1)
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
implements_trait(cx, ty_empty_region, t.def_id(), ty_params)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue