-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Description
Location
rust/compiler/rustc_middle/src/mir/syntax.rs
Lines 722 to 724 in e0883a2
/// Only permitted in cleanup blocks. `Resume` is not permitted with `-C unwind=abort` after | |
/// deaggregation runs. | |
UnwindResume, |
rust/compiler/rustc_middle/src/mir/syntax.rs
Lines 1442 to 1444 in e0883a2
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After | |
/// coroutine lowering, `Coroutine` aggregate kinds are disallowed too. | |
Aggregate(Box<AggregateKind<'tcx>>, IndexVec<FieldIdx, Operand<'tcx>>), |
rust/compiler/rustc_middle/src/mir/syntax.rs
Line 130 in e0883a2
/// * [`Rvalue::Aggregate`] for any `AggregateKind` except `Array` |
rust/compiler/stable_mir/src/mir/body.rs
Lines 486 to 488 in e0883a2
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After | |
/// coroutine lowering, `Coroutine` aggregate kinds are disallowed too. | |
Aggregate(AggregateKind, Vec<Operand>), |
self.fail(location, "`SetDiscriminant`is not allowed until deaggregation"); |
self.fail(location, "`Deinit`is not allowed until deaggregation"); |
rust/compiler/rustc_mir_transform/src/validate.rs
Line 1504 in e0883a2
self.fail(location, "`SetDiscriminant`is not allowed until deaggregation"); |
rust/compiler/rustc_mir_transform/src/validate.rs
Line 1521 in e0883a2
self.fail(location, "`Deinit`is not allowed until deaggregation"); |
/// deaggregation runs. |
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After |
Summary
I was reading the comments in rustc_middle::mir::syntax, and I found that the comments on rustc_middle::mir::syntax::Rvalue::Aggregate is weird.
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After
/// coroutine lowering, `Coroutine` aggregate kinds are disallowed too.
Aggregate(Box<AggregateKind<'tcx>>, IndexVec<FieldIdx, Operand<'tcx>>)
Because I have observed Aggregate
Rvalue
in optimized MIR.
Then I found a pr "Do not deaggregate MIR #107267" stated that deaggregation have been removed from general compiling progress, such that these relevant comments about deaggregation is outdated.
So I think these pieces of comments should be deleted.