validate: use the correct reveal during opts
This commit is contained in:
parent
f5418b09e8
commit
dd9d05cec4
2 changed files with 13 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
use super::{BasicBlock, Constant, Field, Local, SwitchTargets, UserTypeProjection};
|
||||
|
||||
use crate::mir::coverage::{CodeRegion, CoverageKind};
|
||||
use crate::traits::Reveal;
|
||||
use crate::ty::adjustment::PointerCast;
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, List, Ty};
|
||||
|
@ -100,6 +101,13 @@ impl MirPhase {
|
|||
MirPhase::Runtime(RuntimePhase::Optimized) => "runtime-optimized",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reveal(&self) -> Reveal {
|
||||
match *self {
|
||||
MirPhase::Built | MirPhase::Analysis(_) => Reveal::UserFacing,
|
||||
MirPhase::Runtime(_) => Reveal::All,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// See [`MirPhase::Analysis`].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue