Skip to content

Should comments about deaggregation be deleted ? #139323

Open
@y1lan

Description

@y1lan

Location

/// Only permitted in cleanup blocks. `Resume` is not permitted with `-C unwind=abort` after
/// deaggregation runs.
UnwindResume,

/// 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>>),

/// * [`Rvalue::Aggregate`] for any `AggregateKind` except `Array`

/// 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");

self.fail(location, "`SetDiscriminant`is not allowed until deaggregation");

self.fail(location, "`Deinit`is not allowed until deaggregation");

/// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions