diff options
| author | bors <bors@rust-lang.org> | 2020-12-17 18:21:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-17 18:21:20 +0000 |
| commit | 8e9a538ae15e80eb68a6b0dabb1267937531660f (patch) | |
| tree | eecd7619a7606fba9f18fc1a1b3e19f3202de54a | |
| parent | 286e492343239c7dc90fa1b44316ef5d8be6aad5 (diff) | |
| parent | 30ef1770d379e5d269d9b311392a012f66648c65 (diff) | |
| download | rust-8e9a538ae15e80eb68a6b0dabb1267937531660f.tar.gz rust-8e9a538ae15e80eb68a6b0dabb1267937531660f.zip | |
Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis
Move binder for dyn to each list item This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`. This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.` r? `@nikomatsakis`
| -rw-r--r-- | clippy_lints/src/utils/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 3a6b64c90e8..0deaee3a944 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -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; } |
