Remove unnecessary generator-check, which also fixes the issue within async functions
This commit is contained in:
parent
f5df26dbec
commit
9a40f1aa13
@ -9,11 +9,6 @@
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
// build-pass
|
||||
// edition: 2021
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
@ -9,7 +10,7 @@ pub struct Foo {
|
||||
|
||||
pub type Tait = impl Sized;
|
||||
|
||||
pub fn ice_cold(beverage: Tait) {
|
||||
pub async fn ice_cold(beverage: Tait) {
|
||||
// Must destructure at least one field of `Foo`
|
||||
let Foo { field } = beverage;
|
||||
_ = field;
|
||||
|
Loading…
Reference in New Issue
Block a user