Remove ResolvedOpaqueTy and just use Ty, SubstsRef is already there
This commit is contained in:
parent
7f8cad2019
commit
7294f49d52
8 changed files with 40 additions and 69 deletions
|
@ -211,7 +211,7 @@ pub struct BorrowCheckResult<'tcx> {
|
|||
/// All the opaque types that are restricted to concrete types
|
||||
/// by this function. Unlike the value in `TypeckResults`, this has
|
||||
/// unerased regions.
|
||||
pub concrete_opaque_types: VecMap<OpaqueTypeKey<'tcx>, ty::ResolvedOpaqueTy<'tcx>>,
|
||||
pub concrete_opaque_types: VecMap<OpaqueTypeKey<'tcx>, Ty<'tcx>>,
|
||||
pub closure_requirements: Option<ClosureRegionRequirements<'tcx>>,
|
||||
pub used_mut_upvars: SmallVec<[Field; 8]>,
|
||||
}
|
||||
|
|
|
@ -288,17 +288,6 @@ impl<'a, V> LocalTableInContextMut<'a, V> {
|
|||
}
|
||||
}
|
||||
|
||||
/// All information necessary to validate and reveal an `impl Trait`.
|
||||
#[derive(TyEncodable, TyDecodable, Debug, HashStable)]
|
||||
pub struct ResolvedOpaqueTy<'tcx> {
|
||||
/// The revealed type as seen by this function.
|
||||
pub concrete_type: Ty<'tcx>,
|
||||
/// Generic parameters on the opaque type as passed by this function.
|
||||
/// For `type Foo<A, B> = impl Bar<A, B>; fn foo<T, U>() -> Foo<T, U> { .. }`
|
||||
/// this is `[T, U]`, not `[A, B]`.
|
||||
pub substs: SubstsRef<'tcx>,
|
||||
}
|
||||
|
||||
/// Whenever a value may be live across a generator yield, the type of that value winds up in the
|
||||
/// `GeneratorInteriorTypeCause` struct. This struct adds additional information about such
|
||||
/// captured types that can be useful for diagnostics. In particular, it stores the span that
|
||||
|
@ -426,7 +415,7 @@ pub struct TypeckResults<'tcx> {
|
|||
|
||||
/// All the opaque types that are restricted to concrete types
|
||||
/// by this function.
|
||||
pub concrete_opaque_types: VecMap<OpaqueTypeKey<'tcx>, ResolvedOpaqueTy<'tcx>>,
|
||||
pub concrete_opaque_types: VecMap<OpaqueTypeKey<'tcx>, Ty<'tcx>>,
|
||||
|
||||
/// Tracks the minimum captures required for a closure;
|
||||
/// see `MinCaptureInformationMap` for more details.
|
||||
|
|
|
@ -58,7 +58,7 @@ pub use self::consts::{Const, ConstInt, ConstKind, InferConst, ScalarInt, Uneval
|
|||
pub use self::context::{
|
||||
tls, CanonicalUserType, CanonicalUserTypeAnnotation, CanonicalUserTypeAnnotations,
|
||||
CtxtInterners, DelaySpanBugEmitted, FreeRegionInfo, GeneratorInteriorTypeCause, GlobalCtxt,
|
||||
Lift, ResolvedOpaqueTy, TyCtxt, TypeckResults, UserType, UserTypeAnnotationIndex,
|
||||
Lift, TyCtxt, TypeckResults, UserType, UserTypeAnnotationIndex,
|
||||
};
|
||||
pub use self::instance::{Instance, InstanceDef};
|
||||
pub use self::list::List;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue