diff options
| author | b-naber <bn263@gmx.de> | 2022-09-21 18:55:32 +0200 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2022-09-22 12:35:29 +0200 |
| commit | efb908991b2c2cd43c40c8e62f563fdd17d84204 (patch) | |
| tree | 9842b772c2c8de3bc7f4147d596f5cacac5a1a28 | |
| parent | db7df5941890a7f5482b137ddb8ff34e6aec613b (diff) | |
| download | rust-efb908991b2c2cd43c40c8e62f563fdd17d84204.tar.gz rust-efb908991b2c2cd43c40c8e62f563fdd17d84204.zip | |
address review
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 4b3a3085b71..9ff57502a38 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2055,7 +2055,7 @@ pub enum ConstantKind<'tcx> { Ty(ty::Const<'tcx>), /// An unevaluated mir constant which is not part of the type system. - Unevaluated(Unevaluated<'tcx, Option<Promoted>>, Ty<'tcx>), + Unevaluated(Unevaluated<'tcx>, Ty<'tcx>), /// This constant cannot go back into the type system, as it represents /// something the type system cannot handle (e.g. pointers). @@ -2442,10 +2442,10 @@ impl<'tcx> ConstantKind<'tcx> { /// An unevaluated (potentially generic) constant used in MIR. #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable, Lift)] #[derive(Hash, HashStable)] -pub struct Unevaluated<'tcx, P = Option<Promoted>> { +pub struct Unevaluated<'tcx> { pub def: ty::WithOptConstParam<DefId>, pub substs: SubstsRef<'tcx>, - pub promoted: P, + pub promoted: Option<Promoted>, } impl<'tcx> Unevaluated<'tcx> { @@ -2457,9 +2457,9 @@ impl<'tcx> Unevaluated<'tcx> { } } -impl<'tcx, P: Default> Unevaluated<'tcx, P> { +impl<'tcx> Unevaluated<'tcx> { #[inline] - pub fn new(def: ty::WithOptConstParam<DefId>, substs: SubstsRef<'tcx>) -> Unevaluated<'tcx, P> { + pub fn new(def: ty::WithOptConstParam<DefId>, substs: SubstsRef<'tcx>) -> Unevaluated<'tcx> { Unevaluated { def, substs, promoted: Default::default() } } } |
