Skip to content

Should comments about deaggregation be deleted ? #139323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
y1lan opened this issue Apr 3, 2025 · 0 comments
Open

Should comments about deaggregation be deleted ? #139323

y1lan opened this issue Apr 3, 2025 · 0 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@y1lan
Copy link
Contributor

y1lan commented Apr 3, 2025

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.

@y1lan y1lan added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Apr 3, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 3, 2025
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html labels Apr 4, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants