Rollup merge of #106829 - compiler-errors:more-alias-combine, r=spastorino
Unify `Opaque`/`Projection` handling in region outlives code They share basically identical paths in most places which are even easier to unify now that they're both `ty::Alias` r? types
This commit is contained in:
commit
6b49435480
12 changed files with 54 additions and 114 deletions
|
@ -8,9 +8,8 @@
|
|||
use crate::error::DropCheckOverflow;
|
||||
use crate::infer::canonical::{Canonical, QueryResponse};
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::ty::subst::{GenericArg, SubstsRef};
|
||||
use crate::ty::subst::GenericArg;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
pub mod type_op {
|
||||
|
@ -214,6 +213,5 @@ pub struct NormalizationResult<'tcx> {
|
|||
pub enum OutlivesBound<'tcx> {
|
||||
RegionSubRegion(ty::Region<'tcx>, ty::Region<'tcx>),
|
||||
RegionSubParam(ty::Region<'tcx>, ty::ParamTy),
|
||||
RegionSubProjection(ty::Region<'tcx>, ty::AliasTy<'tcx>),
|
||||
RegionSubOpaque(ty::Region<'tcx>, DefId, SubstsRef<'tcx>),
|
||||
RegionSubAlias(ty::Region<'tcx>, ty::AliasKind, ty::AliasTy<'tcx>),
|
||||
}
|
||||
|
|
|
@ -227,6 +227,7 @@ TrivialTypeTraversalAndLiftImpls! {
|
|||
crate::ty::BoundRegionKind,
|
||||
crate::ty::AssocItem,
|
||||
crate::ty::AssocKind,
|
||||
crate::ty::AliasKind,
|
||||
crate::ty::Placeholder<crate::ty::BoundRegionKind>,
|
||||
crate::ty::ClosureKind,
|
||||
crate::ty::FreeRegion,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue