Skip to content

Commit

Permalink
Move binder for dyn to each list item
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Dec 11, 2020
1 parent 0e527ba commit 30ef177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1449,8 +1449,8 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
false
},
ty::Dynamic(binder, _) => {
for predicate in binder.skip_binder().iter() {
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate {
for predicate in binder.iter() {
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate.skip_binder() {
if must_use_attr(&cx.tcx.get_attrs(trait_ref.def_id)).is_some() {
return true;
}
Expand Down

0 comments on commit 30ef177

Please sign in to comment.