Remove ResolvedOpaqueTy and just use Ty, SubstsRef is already there

This commit is contained in:
Santiago Pastorino
2021-06-07 14:40:47 -03:00
parent 7f8cad2019
commit 7294f49d52
8 changed files with 40 additions and 69 deletions

View File

@@ -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.