Remove unnecessary generator-check, which also fixes the issue within async functions
This commit is contained in:
parent
f5df26dbec
commit
9a40f1aa13
2 changed files with 2 additions and 6 deletions
|
@ -9,11 +9,6 @@ pub struct RevealAll;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for RevealAll {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
// Do not apply this transformation to generators.
|
||||
if body.generator.is_some() {
|
||||
return;
|
||||
}
|
||||
|
||||
let param_env = tcx.param_env_reveal_all_normalized(body.source.def_id());
|
||||
RevealAllVisitor { tcx, param_env }.visit_body_preserves_cfg(body);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue