Skip to content

Commit 844e3fb

Browse files
authored
Rollup merge of #104595 - compiler-errors:poly-existential-predicate, r=lcnr
Add `PolyExistentialPredicate` type alias Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
2 parents cc2397b + c36ff28 commit 844e3fb

File tree

20 files changed

+48
-53
lines changed

20 files changed

+48
-53
lines changed

compiler/rustc_const_eval/src/util/type_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
7474

7575
fn print_dyn_existential(
7676
self,
77-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
77+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
7878
) -> Result<Self::DynExistential, Self::Error> {
7979
self.pretty_print_dyn_existential(predicates)
8080
}

compiler/rustc_hir_analysis/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
30233023
fn compute_object_lifetime_bound(
30243024
&self,
30253025
span: Span,
3026-
existential_predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
3026+
existential_predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
30273027
) -> Option<ty::Region<'tcx>> // if None, use the default
30283028
{
30293029
let tcx = self.tcx();

compiler/rustc_hir_typeck/src/coercion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
748748
&self,
749749
a: Ty<'tcx>,
750750
b: Ty<'tcx>,
751-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
751+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
752752
b_region: ty::Region<'tcx>,
753753
) -> CoerceResult<'tcx> {
754754
if !self.tcx.features().dyn_star {

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
542542

543543
fn print_dyn_existential(
544544
self,
545-
_predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
545+
_predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
546546
) -> Result<Self::DynExistential, Self::Error> {
547547
Err(NonTrivialPath)
548548
}

compiler/rustc_lint/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ impl<'tcx> LateContext<'tcx> {
11591159

11601160
fn print_dyn_existential(
11611161
self,
1162-
_predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
1162+
_predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
11631163
) -> Result<Self::DynExistential, Self::Error> {
11641164
Ok(())
11651165
}

compiler/rustc_middle/src/ty/codec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ty::List<Ty
298298
}
299299

300300
impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D>
301-
for ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>
301+
for ty::List<ty::PolyExistentialPredicate<'tcx>>
302302
{
303303
fn decode(decoder: &mut D) -> &'tcx Self {
304304
let len = decoder.read_usize();
@@ -379,7 +379,7 @@ impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D>
379379
impl_decodable_via_ref! {
380380
&'tcx ty::TypeckResults<'tcx>,
381381
&'tcx ty::List<Ty<'tcx>>,
382-
&'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
382+
&'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
383383
&'tcx traits::ImplSource<'tcx, ()>,
384384
&'tcx mir::Body<'tcx>,
385385
&'tcx mir::UnsafetyCheckResult,

compiler/rustc_middle/src/ty/context.rs

+13-17
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ use crate::traits;
1717
use crate::ty::query::{self, TyCtxtAt};
1818
use crate::ty::{
1919
self, AdtDef, AdtDefData, AdtKind, Binder, BindingMode, BoundVar, CanonicalPolyFnSig,
20-
ClosureSizeProfileData, Const, ConstS, ConstVid, DefIdTree, ExistentialPredicate, FloatTy,
21-
FloatVar, FloatVid, GenericParamDefKind, InferConst, InferTy, IntTy, IntVar, IntVid, List,
22-
ParamConst, ParamTy, PolyFnSig, Predicate, PredicateKind, PredicateS, ProjectionTy, Region,
23-
RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, TyS, TyVar, TyVid, TypeAndMut, UintTy,
24-
Visibility,
20+
ClosureSizeProfileData, Const, ConstS, ConstVid, DefIdTree, FloatTy, FloatVar, FloatVid,
21+
GenericParamDefKind, InferConst, InferTy, IntTy, IntVar, IntVid, List, ParamConst, ParamTy,
22+
PolyExistentialPredicate, PolyFnSig, Predicate, PredicateKind, PredicateS, ProjectionTy,
23+
Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, TyS, TyVar, TyVid, TypeAndMut,
24+
UintTy, Visibility,
2525
};
2626
use crate::ty::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef, UserSubsts};
2727
use rustc_ast as ast;
@@ -109,7 +109,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
109109
type Mutability = hir::Mutability;
110110
type Movability = hir::Movability;
111111
type PolyFnSig = PolyFnSig<'tcx>;
112-
type ListBinderExistentialPredicate = &'tcx List<Binder<'tcx, ExistentialPredicate<'tcx>>>;
112+
type ListBinderExistentialPredicate = &'tcx List<PolyExistentialPredicate<'tcx>>;
113113
type BinderListTy = Binder<'tcx, &'tcx List<Ty<'tcx>>>;
114114
type ListTy = &'tcx List<Ty<'tcx>>;
115115
type ProjectionTy = ty::ProjectionTy<'tcx>;
@@ -140,8 +140,7 @@ pub struct CtxtInterners<'tcx> {
140140
substs: InternedSet<'tcx, InternalSubsts<'tcx>>,
141141
canonical_var_infos: InternedSet<'tcx, List<CanonicalVarInfo<'tcx>>>,
142142
region: InternedSet<'tcx, RegionKind<'tcx>>,
143-
poly_existential_predicates:
144-
InternedSet<'tcx, List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>>>,
143+
poly_existential_predicates: InternedSet<'tcx, List<PolyExistentialPredicate<'tcx>>>,
145144
predicate: InternedSet<'tcx, PredicateS<'tcx>>,
146145
predicates: InternedSet<'tcx, List<Predicate<'tcx>>>,
147146
projs: InternedSet<'tcx, List<ProjectionKind>>,
@@ -1810,7 +1809,7 @@ nop_lift! {const_; Const<'a> => Const<'tcx>}
18101809
nop_lift! {const_allocation; ConstAllocation<'a> => ConstAllocation<'tcx>}
18111810
nop_lift! {predicate; Predicate<'a> => Predicate<'tcx>}
18121811

1813-
nop_list_lift! {poly_existential_predicates; ty::Binder<'a, ExistentialPredicate<'a>> => ty::Binder<'tcx, ExistentialPredicate<'tcx>>}
1812+
nop_list_lift! {poly_existential_predicates; PolyExistentialPredicate<'a> => PolyExistentialPredicate<'tcx>}
18141813
nop_list_lift! {predicates; Predicate<'a> => Predicate<'tcx>}
18151814
nop_list_lift! {canonical_var_infos; CanonicalVarInfo<'a> => CanonicalVarInfo<'tcx>}
18161815
nop_list_lift! {projs; ProjectionKind => ProjectionKind}
@@ -2265,7 +2264,7 @@ slice_interners!(
22652264
substs: _intern_substs(GenericArg<'tcx>),
22662265
canonical_var_infos: _intern_canonical_var_infos(CanonicalVarInfo<'tcx>),
22672266
poly_existential_predicates:
2268-
_intern_poly_existential_predicates(ty::Binder<'tcx, ExistentialPredicate<'tcx>>),
2267+
_intern_poly_existential_predicates(PolyExistentialPredicate<'tcx>),
22692268
predicates: _intern_predicates(Predicate<'tcx>),
22702269
projs: _intern_projs(ProjectionKind),
22712270
place_elems: _intern_place_elems(PlaceElem<'tcx>),
@@ -2544,7 +2543,7 @@ impl<'tcx> TyCtxt<'tcx> {
25442543
#[inline]
25452544
pub fn mk_dynamic(
25462545
self,
2547-
obj: &'tcx List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>>,
2546+
obj: &'tcx List<PolyExistentialPredicate<'tcx>>,
25482547
reg: ty::Region<'tcx>,
25492548
repr: DynKind,
25502549
) -> Ty<'tcx> {
@@ -2682,8 +2681,8 @@ impl<'tcx> TyCtxt<'tcx> {
26822681

26832682
pub fn intern_poly_existential_predicates(
26842683
self,
2685-
eps: &[ty::Binder<'tcx, ExistentialPredicate<'tcx>>],
2686-
) -> &'tcx List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>> {
2684+
eps: &[PolyExistentialPredicate<'tcx>],
2685+
) -> &'tcx List<PolyExistentialPredicate<'tcx>> {
26872686
assert!(!eps.is_empty());
26882687
assert!(
26892688
eps.array_windows()
@@ -2767,10 +2766,7 @@ impl<'tcx> TyCtxt<'tcx> {
27672766
}
27682767

27692768
pub fn mk_poly_existential_predicates<
2770-
I: InternAs<
2771-
[ty::Binder<'tcx, ExistentialPredicate<'tcx>>],
2772-
&'tcx List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>>,
2773-
>,
2769+
I: InternAs<[PolyExistentialPredicate<'tcx>], &'tcx List<PolyExistentialPredicate<'tcx>>>,
27742770
>(
27752771
self,
27762772
iter: I,

compiler/rustc_middle/src/ty/error.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ pub enum TypeError<'tcx> {
6969
CyclicTy(Ty<'tcx>),
7070
CyclicConst(ty::Const<'tcx>),
7171
ProjectionMismatched(ExpectedFound<DefId>),
72-
ExistentialMismatch(
73-
ExpectedFound<&'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>>,
74-
),
72+
ExistentialMismatch(ExpectedFound<&'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>>),
7573
ObjectUnsafeCoercion(DefId),
7674
ConstMismatch(ExpectedFound<ty::Const<'tcx>>),
7775

compiler/rustc_middle/src/ty/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ pub use self::sty::{
9494
BoundVariableKind, CanonicalPolyFnSig, ClosureSubsts, ClosureSubstsParts, ConstVid,
9595
EarlyBoundRegion, ExistentialPredicate, ExistentialProjection, ExistentialTraitRef, FnSig,
9696
FreeRegion, GenSig, GeneratorSubsts, GeneratorSubstsParts, InlineConstSubsts,
97-
InlineConstSubstsParts, ParamConst, ParamTy, PolyExistentialProjection,
98-
PolyExistentialTraitRef, PolyFnSig, PolyGenSig, PolyTraitRef, ProjectionTy, Region, RegionKind,
99-
RegionVid, TraitRef, TyKind, TypeAndMut, UpvarSubsts, VarianceDiagInfo,
97+
InlineConstSubstsParts, ParamConst, ParamTy, PolyExistentialPredicate,
98+
PolyExistentialProjection, PolyExistentialTraitRef, PolyFnSig, PolyGenSig, PolyTraitRef,
99+
ProjectionTy, Region, RegionKind, RegionVid, TraitRef, TyKind, TypeAndMut, UpvarSubsts,
100+
VarianceDiagInfo,
100101
};
101102
pub use self::trait_def::TraitDef;
102103

compiler/rustc_middle/src/ty/print/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub trait Printer<'tcx>: Sized {
6363

6464
fn print_dyn_existential(
6565
self,
66-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
66+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
6767
) -> Result<Self::DynExistential, Self::Error>;
6868

6969
fn print_const(self, ct: ty::Const<'tcx>) -> Result<Self::Const, Self::Error>;
@@ -308,9 +308,7 @@ impl<'tcx, P: Printer<'tcx>> Print<'tcx, P> for Ty<'tcx> {
308308
}
309309
}
310310

311-
impl<'tcx, P: Printer<'tcx>> Print<'tcx, P>
312-
for &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>
313-
{
311+
impl<'tcx, P: Printer<'tcx>> Print<'tcx, P> for &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>> {
314312
type Output = P::DynExistential;
315313
type Error = P::Error;
316314
fn print(&self, cx: P) -> Result<Self::Output, Self::Error> {

compiler/rustc_middle/src/ty/print/pretty.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ pub trait PrettyPrinter<'tcx>:
10601060

10611061
fn pretty_print_dyn_existential(
10621062
mut self,
1063-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
1063+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
10641064
) -> Result<Self::DynExistential, Self::Error> {
10651065
// Generate the main trait ref, including associated types.
10661066
let mut first = true;
@@ -1772,7 +1772,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
17721772

17731773
fn print_dyn_existential(
17741774
self,
1775-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
1775+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
17761776
) -> Result<Self::DynExistential, Self::Error> {
17771777
self.pretty_print_dyn_existential(predicates)
17781778
}
@@ -2530,12 +2530,12 @@ pub struct PrintClosureAsImpl<'tcx> {
25302530
forward_display_to_print! {
25312531
ty::Region<'tcx>,
25322532
Ty<'tcx>,
2533-
&'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
2533+
&'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
25342534
ty::Const<'tcx>,
25352535

25362536
// HACK(eddyb) these are exhaustive instead of generic,
25372537
// because `for<'tcx>` isn't possible yet.
2538-
ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>,
2538+
ty::PolyExistentialPredicate<'tcx>,
25392539
ty::Binder<'tcx, ty::TraitRef<'tcx>>,
25402540
ty::Binder<'tcx, ty::ExistentialTraitRef<'tcx>>,
25412541
ty::Binder<'tcx, TraitRefPrintOnlyTraitPath<'tcx>>,

compiler/rustc_middle/src/ty/relate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ pub fn super_relate_consts<'tcx, R: TypeRelation<'tcx>>(
649649
if is_match { Ok(a) } else { Err(TypeError::ConstMismatch(expected_found(relation, a, b))) }
650650
}
651651

652-
impl<'tcx> Relate<'tcx> for &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>> {
652+
impl<'tcx> Relate<'tcx> for &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>> {
653653
fn relate<R: TypeRelation<'tcx>>(
654654
relation: &mut R,
655655
a: Self,

compiler/rustc_middle/src/ty/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ impl<'tcx, T: TypeVisitable<'tcx>> TypeSuperVisitable<'tcx> for ty::Binder<'tcx,
586586
}
587587
}
588588

589-
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>> {
589+
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>> {
590590
fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
591591
ty::util::fold_list(self, folder, |tcx, v| tcx.intern_poly_existential_predicates(v))
592592
}

compiler/rustc_middle/src/ty/sty.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,9 @@ impl<'tcx> ExistentialPredicate<'tcx> {
703703
}
704704
}
705705

706-
impl<'tcx> Binder<'tcx, ExistentialPredicate<'tcx>> {
706+
pub type PolyExistentialPredicate<'tcx> = Binder<'tcx, ExistentialPredicate<'tcx>>;
707+
708+
impl<'tcx> PolyExistentialPredicate<'tcx> {
707709
/// Given an existential predicate like `?Self: PartialEq<u32>` (e.g., derived from `dyn PartialEq<u32>`),
708710
/// and a concrete type `self_ty`, returns a full predicate where the existentially quantified variable `?Self`
709711
/// has been replaced with `self_ty` (e.g., `self_ty: PartialEq<u32>`, in our example).
@@ -727,7 +729,7 @@ impl<'tcx> Binder<'tcx, ExistentialPredicate<'tcx>> {
727729
}
728730
}
729731

730-
impl<'tcx> List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>> {
732+
impl<'tcx> List<ty::PolyExistentialPredicate<'tcx>> {
731733
/// Returns the "principal `DefId`" of this set of existential predicates.
732734
///
733735
/// A Rust trait object type consists (in addition to a lifetime bound)

compiler/rustc_symbol_mangling/src/legacy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> {
244244

245245
fn print_dyn_existential(
246246
mut self,
247-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
247+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
248248
) -> Result<Self::DynExistential, Self::Error> {
249249
let mut first = true;
250250
for p in predicates {

compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use rustc_data_structures::fx::FxHashMap;
1212
use rustc_hir as hir;
1313
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, SubstsRef};
1414
use rustc_middle::ty::{
15-
self, Binder, Const, ExistentialPredicate, FloatTy, FnSig, IntTy, List, Region, RegionKind,
16-
TermKind, Ty, TyCtxt, UintTy,
15+
self, Const, ExistentialPredicate, FloatTy, FnSig, IntTy, List, Region, RegionKind, TermKind,
16+
Ty, TyCtxt, UintTy,
1717
};
1818
use rustc_span::def_id::DefId;
1919
use rustc_span::symbol::sym;
@@ -226,7 +226,7 @@ fn encode_fnsig<'tcx>(
226226
/// Rust types that are not used at the FFI boundary.
227227
fn encode_predicate<'tcx>(
228228
tcx: TyCtxt<'tcx>,
229-
predicate: Binder<'tcx, ExistentialPredicate<'tcx>>,
229+
predicate: ty::PolyExistentialPredicate<'tcx>,
230230
dict: &mut FxHashMap<DictKey<'tcx>, usize>,
231231
options: EncodeTyOptions,
232232
) -> String {
@@ -261,13 +261,13 @@ fn encode_predicate<'tcx>(
261261
/// Rust types that are not used at the FFI boundary.
262262
fn encode_predicates<'tcx>(
263263
tcx: TyCtxt<'tcx>,
264-
predicates: &List<Binder<'tcx, ExistentialPredicate<'tcx>>>,
264+
predicates: &List<ty::PolyExistentialPredicate<'tcx>>,
265265
dict: &mut FxHashMap<DictKey<'tcx>, usize>,
266266
options: EncodeTyOptions,
267267
) -> String {
268268
// <predicate1[..predicateN]>E as part of vendor extended type
269269
let mut s = String::new();
270-
let predicates: Vec<Binder<'tcx, ExistentialPredicate<'tcx>>> =
270+
let predicates: Vec<ty::PolyExistentialPredicate<'tcx>> =
271271
predicates.iter().map(|predicate| predicate).collect();
272272
for predicate in predicates {
273273
s.push_str(&encode_predicate(tcx, predicate, dict, options));

compiler/rustc_symbol_mangling/src/v0.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
502502

503503
fn print_dyn_existential(
504504
mut self,
505-
predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
505+
predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
506506
) -> Result<Self::DynExistential, Self::Error> {
507507
// Okay, so this is a bit tricky. Imagine we have a trait object like
508508
// `dyn for<'a> Foo<'a, Bar = &'a ()>`. When we mangle this, the

compiler/rustc_trait_selection/src/traits/wf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ impl<'tcx> WfPredicates<'tcx> {
758758
fn from_object_ty(
759759
&mut self,
760760
ty: Ty<'tcx>,
761-
data: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
761+
data: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
762762
region: ty::Region<'tcx>,
763763
) {
764764
// Imagine a type like this:
@@ -822,7 +822,7 @@ impl<'tcx> WfPredicates<'tcx> {
822822
/// `infer::required_region_bounds`, see that for more information.
823823
pub fn object_region_bounds<'tcx>(
824824
tcx: TyCtxt<'tcx>,
825-
existential_predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
825+
existential_predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
826826
) -> Vec<ty::Region<'tcx>> {
827827
// Since we don't actually *know* the self type for an object,
828828
// this "open(err)" serves as a kind of dummy standin -- basically

compiler/rustc_traits/src/chalk/lowering.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ impl<'tcx> LowerInto<'tcx, Option<chalk_ir::QuantifiedWhereClause<RustInterner<'
634634
}
635635

636636
impl<'tcx> LowerInto<'tcx, chalk_ir::Binders<chalk_ir::QuantifiedWhereClauses<RustInterner<'tcx>>>>
637-
for &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>
637+
for &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>
638638
{
639639
fn lower_into(
640640
self,

src/tools/clippy/clippy_lints/src/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ fn check_ptr_arg_usage<'tcx>(cx: &LateContext<'tcx>, body: &'tcx Body<'_>, args:
687687
fn matches_preds<'tcx>(
688688
cx: &LateContext<'tcx>,
689689
ty: Ty<'tcx>,
690-
preds: &'tcx [Binder<'tcx, ExistentialPredicate<'tcx>>],
690+
preds: &'tcx [ty::PolyExistentialPredicate<'tcx>],
691691
) -> bool {
692692
let infcx = cx.tcx.infer_ctxt().build();
693693
preds.iter().all(|&p| match cx.tcx.erase_late_bound_regions(p) {

0 commit comments

Comments
 (0)