Skip to content

Commit

Permalink
Auto merge of #4700 - lzutao:rustup-65535, r=phansch
Browse files Browse the repository at this point in the history
rustup rust-lang/rust#65535

cc rust-lang/rust#65585
changelog: none
  • Loading branch information
bors committed Oct 19, 2019
2 parents 850ad52 + 4c7387e commit dbc4040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dbc4040

Please sign in to comment.