diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-26 20:43:31 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-13 17:27:41 +0000 |
| commit | 918ede64740b3610dfd8b43ff0d995261a236ac5 (patch) | |
| tree | 89a87e5db71fe836eeab6a519dc681f126a3011e /compiler/rustc_middle/src | |
| parent | ed620cf9690fdafed65845bf35c455db992fbba1 (diff) | |
| download | rust-918ede64740b3610dfd8b43ff0d995261a236ac5.tar.gz rust-918ede64740b3610dfd8b43ff0d995261a236ac5.zip | |
make Opaque have one field: OpaqueTy
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index e480414a358..efc45b5646e 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -97,7 +97,7 @@ pub use self::sty::{ BoundVariableKind, CanonicalPolyFnSig, ClosureSubsts, ClosureSubstsParts, ConstVid, EarlyBoundRegion, ExistentialPredicate, ExistentialProjection, ExistentialTraitRef, FnSig, FreeRegion, GenSig, GeneratorSubsts, GeneratorSubstsParts, InlineConstSubsts, - InlineConstSubstsParts, ParamConst, ParamTy, PolyExistentialPredicate, + InlineConstSubstsParts, OpaqueTy, ParamConst, ParamTy, PolyExistentialPredicate, PolyExistentialProjection, PolyExistentialTraitRef, PolyFnSig, PolyGenSig, PolyTraitRef, ProjectionTy, Region, RegionKind, RegionVid, TraitRef, TyKind, TypeAndMut, UpvarSubsts, VarianceDiagInfo, diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 9b9c26d6a8b..4c75614a5bc 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1199,6 +1199,16 @@ impl<'tcx> ProjectionTy<'tcx> { } } +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, TyEncodable, TyDecodable)] +#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)] +pub struct OpaqueTy<'tcx> { + /// The parameters of the opaque. + pub substs: SubstsRef<'tcx>, + + /// The `DefId` of the `impl Trait`. + pub def_id: DefId, +} + #[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable, Lift)] pub struct GenSig<'tcx> { pub resume_ty: Ty<'tcx>, |
