Skip to content

Commit 8e9a538

Browse files
committed
Auto merge of rust-lang#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`
2 parents 286e492 + 30ef177 commit 8e9a538

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/utils/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,8 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
14491449
false
14501450
},
14511451
ty::Dynamic(binder, _) => {
1452-
for predicate in binder.skip_binder().iter() {
1453-
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate {
1452+
for predicate in binder.iter() {
1453+
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate.skip_binder() {
14541454
if must_use_attr(&cx.tcx.get_attrs(trait_ref.def_id)).is_some() {
14551455
return true;
14561456
}

0 commit comments

Comments
 (0)