Skip to content

Remove rustc_legacy_const_generics from unstable intrinsics - #2254

Open
TechnoPorg wants to merge 2 commits into
rust-lang:mainfrom
TechnoPorg:push-mwwoxvvolwwx
Open

TechnoPorg wants to merge 2 commits into
rust-lang:mainfrom
TechnoPorg:push-mwwoxvvolwwx

Conversation

@TechnoPorg

Copy link
Copy Markdown

As discussed in rust-lang/rust#149654 and #2248 (comment), intrinsics using this feature should not be stabilized. Since none of these architectures have stable intrinsics yet (unlike x86{_64}, ARM, WASM, and AArch64, which are excluded from this PR), rustc_legacy_const_generics can be removed without creating inconsistencies.

LoongArch has also not been touched here as it appears to be handled in #2221.

@rustbot

rustbot commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @sayantn (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn expanded to Amanieu, adamgemmell, davidtwco, folkertdev, sayantn
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev, sayantn

Comment on lines +192 to +196
// Some of the functions extracted from mips-msa.h have immediate arguments between non-immediate arguments,
// but Rust const generics are not function arguments and cannot be expressed in a way that matches the header.
// For the sake of verification, rust const generics are treated as "the last arguments to a function".
arg_tys.sort_by(|arg1, arg2| arg1.is_const().cmp(&arg2.is_const()));

@TechnoPorg TechnoPorg Oct 12, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels gross, but then again, so does having const arguments in the middle of other non-const arguments 🤷‍♀️

View changes since the review

@sayantn

sayantn commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

#2255

@rustbot reroll

@rustbot rustbot assigned folkertdev and unassigned sayantn Oct 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants