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 | eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e (patch) | |
| tree | 98e37a458058d875b8a5d7cb0d3a5a99e8414b9d /compiler/rustc_lint/src | |
| parent | d23e08448332425a84ae23124bea4dbd685536ce (diff) | |
| parent | 2edd3016c8bab6f849ca3a907ecd800777e36846 (diff) | |
| download | rust-eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e.tar.gz rust-eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e.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`
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 16563d21ff1..bfeef490489 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -786,7 +786,7 @@ impl<'tcx> LateContext<'tcx> { fn print_dyn_existential( self, - _predicates: &'tcx ty::List<ty::ExistentialPredicate<'tcx>>, + _predicates: &'tcx ty::List<ty::Binder<ty::ExistentialPredicate<'tcx>>>, ) -> Result<Self::DynExistential, Self::Error> { Ok(()) } diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index 2a5ad5e6c98..5e1f94c071c 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -218,8 +218,10 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults { } ty::Dynamic(binder, _) => { let mut has_emitted = false; - 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() + { let def_id = trait_ref.def_id; let descr_post = &format!(" trait object{}{}", plural_suffix, descr_post,); |
