diff options
| author | bors <bors@rust-lang.org> | 2019-10-19 05:41:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-19 05:41:18 +0000 |
| commit | dbc40400defa5444e28193490a2aebd07724e1eb (patch) | |
| tree | 547db8301e55802efa748002d8f0a24284ef9ad1 | |
| parent | 850ad526df037f8eb1e2e4a596f08c5e3efab76e (diff) | |
| parent | 4c7387e96546e5382dbb7c8961251cab3f794e25 (diff) | |
| download | rust-dbc40400defa5444e28193490a2aebd07724e1eb.tar.gz rust-dbc40400defa5444e28193490a2aebd07724e1eb.zip | |
Auto merge of #4700 - lzutao:rustup-65535, r=phansch
rustup https://github.com/rust-lang/rust/pull/65535 cc https://github.com/rust-lang/rust/issues/65585 changelog: none
| -rw-r--r-- | clippy_lints/src/functions.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs index 8e295af234c..59a16c36d90 100644 --- a/clippy_lints/src/functions.rs +++ b/clippy_lints/src/functions.rs @@ -493,7 +493,7 @@ fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool { }, Tuple(ref substs) => substs.types().any(|ty| is_must_use_ty(cx, ty)), Opaque(ref def_id, _) => { - for (predicate, _) in &cx.tcx.predicates_of(*def_id).predicates { + for (predicate, _) in cx.tcx.predicates_of(*def_id).predicates { if let ty::Predicate::Trait(ref poly_trait_predicate) = predicate { if must_use_attr(&cx.tcx.get_attrs(poly_trait_predicate.skip_binder().trait_ref.def_id)).is_some() { return true; diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 74538164f8e..e7b07bb1c1b 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -1322,7 +1322,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Methods { // if return type is impl trait, check the associated types if let ty::Opaque(def_id, _) = ret_ty.kind { // one of the associated types must be Self - for predicate in &cx.tcx.predicates_of(def_id).predicates { + for predicate in cx.tcx.predicates_of(def_id).predicates { match predicate { (Predicate::Projection(poly_projection_predicate), _) => { let binder = poly_projection_predicate.ty(); |
