Skip to content

Commit dbc4040

Browse files
committed
Auto merge of #4700 - lzutao:rustup-65535, r=phansch
rustup rust-lang/rust#65535 cc rust-lang/rust#65585 changelog: none
2 parents 850ad52 + 4c7387e commit dbc4040

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/functions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
493493
},
494494
Tuple(ref substs) => substs.types().any(|ty| is_must_use_ty(cx, ty)),
495495
Opaque(ref def_id, _) => {
496-
for (predicate, _) in &cx.tcx.predicates_of(*def_id).predicates {
496+
for (predicate, _) in cx.tcx.predicates_of(*def_id).predicates {
497497
if let ty::Predicate::Trait(ref poly_trait_predicate) = predicate {
498498
if must_use_attr(&cx.tcx.get_attrs(poly_trait_predicate.skip_binder().trait_ref.def_id)).is_some() {
499499
return true;

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Methods {
13221322
// if return type is impl trait, check the associated types
13231323
if let ty::Opaque(def_id, _) = ret_ty.kind {
13241324
// one of the associated types must be Self
1325-
for predicate in &cx.tcx.predicates_of(def_id).predicates {
1325+
for predicate in cx.tcx.predicates_of(def_id).predicates {
13261326
match predicate {
13271327
(Predicate::Projection(poly_projection_predicate), _) => {
13281328
let binder = poly_projection_predicate.ty();

0 commit comments

Comments
 (0)