Skip to content

Commit

Permalink
Fix change to predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Nov 19, 2018
1 parent 0ab70fa commit 737dec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_lint/unused.rs
Expand Up @@ -68,7 +68,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
ty::Adt(def, _) => check_must_use(cx, def.did, s.span, "", ""),
ty::Opaque(def, _) => {
let mut must_use = false;
for (predicate, _) in cx.tcx.predicates_of(def).predicates {
for (predicate, _) in &cx.tcx.predicates_of(def).predicates {
if let ty::Predicate::Trait(ref poly_trait_predicate) = predicate {
let trait_ref = poly_trait_predicate.skip_binder().trait_ref;
if check_must_use(cx, trait_ref.def_id, s.span, "implementer of ", "") {
Expand Down

0 comments on commit 737dec0

Please sign in to comment.