Skip to content

Update cold and inline to use the attribute template #1907

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
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 30, 2025

New rules:

  • attributes.codegen.inline.syntax
  • attributes.codegen.inline.allowed-positions
  • attributes.codegen.inline.duplicates
  • attributes.codegen.inline.trait
  • attributes.codegen.inline.externally-exported
  • attributes.codegen.cold.intro
  • attributes.codegen.cold.syntax
  • attributes.codegen.cold.allowed-positions
  • attributes.codegen.cold.duplicates
  • attributes.codegen.cold.trait

Removed rules:

  • attributes.codegen.hint
  • attributes.codegen.hint.cold-inline
  • attributes.codegen.hint.usage --- split into the corresponding attributes

ehuss added 7 commits June 27, 2025 14:45
I didn't feel like this section was pulling its weight. It also wasn't
entirely correct.
This adds some wording that was removed from the "optimization hints"
section.
This rule did not seem to be covered elsewhere. I'm not 100% positive
this is the best way to document this, but I think it is accurate.

This is implemented in
https://github.com/rust-lang/rust/blob/5526a2f47cd676ceeedc08cf71ae75ce2e9284ae/compiler/rustc_passes/src/check_attr.rs#L482-L497
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants