1
Fork 0

Unconditionally run RevealAll pass and run it earlier

This commit is contained in:
Oli Scherer 2023-09-11 15:00:46 +00:00
parent ec6f554536
commit f5df26dbec
8 changed files with 80 additions and 26 deletions

View file

@ -8,10 +8,6 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
pub struct RevealAll;
impl<'tcx> MirPass<'tcx> for RevealAll {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() >= 3 || super::inline::Inline.is_enabled(sess)
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// Do not apply this transformation to generators.
if body.generator.is_some() {