Rollup merge of #120498 - compiler-errors:type-flags, r=lcnr
Uplift `TypeVisitableExt` into `rustc_type_ir` This uplifts `TypeVisitableExt` into `rustc_type_ir` so it can be used in an interner-agnostic way. It also moves some `TypeSuperVisitable` bounds onto `Interner` since we don't expect to support libraries that have types which aren't foldable by default. This restores a couple of asserts in the canonicalizer code we uplifted, and also makes it so that we can use type-flags-based helpers in the solver code, which I'm interested in uplifting. r? lcnr
This commit is contained in:
commit
cc54612ac3
13 changed files with 469 additions and 341 deletions
|
@ -504,6 +504,16 @@ impl<'tcx> IntoKind for Ty<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> rustc_type_ir::visit::Flags for Ty<'tcx> {
|
||||
fn flags(&self) -> TypeFlags {
|
||||
self.0.flags
|
||||
}
|
||||
|
||||
fn outer_exclusive_binder(&self) -> DebruijnIndex {
|
||||
self.0.outer_exclusive_binder
|
||||
}
|
||||
}
|
||||
|
||||
impl EarlyParamRegion {
|
||||
/// Does this early bound region have a name? Early bound regions normally
|
||||
/// always have names except when using anonymous lifetimes (`'_`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue