rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

RFC: `--crate-attr`

Open jyn514 opened this issue 9 months ago • 4 comments

Rendered

cc https://github.com/rust-lang/rust/issues/138287

Differences from the current nightly implementation (note that this section is non-normative):

  • -A -W -D -F become aliases for crate-attr
  • Attributes are prepended, not appended.
  • Everything about how this interacts with doctests (see https://github.com/rust-lang/rfcs/pull/3791#discussion_r1999037718)
  • The attribute shares the same Span as the crate root. In particular file! behaves properly now and the edition is no longer always 2015.

jyn514 avatar Mar 17 '25 05:03 jyn514

@rfcbot fcp merge

I've wanted this functionality before myself, and it's a requested feature from Rust for Linux, so demand exists. I think the RFC does a good job motivating the feature and noting edge cases that need resolution, though personally nothing that necessarily seems like it blocks stabilization. So, proposing we merge it.

Mark-Simulacrum avatar Mar 30 '25 15:03 Mark-Simulacrum

Team member @Mark-Simulacrum has proposed to merge this. The next step is review by the rest of the tagged team members:

  • [x] @Mark-Simulacrum
  • [x] @Noratrieb
  • [ ] @SparrowLii
  • [x] @cjgillot
  • [x] @compiler-errors
  • [x] @davidtwco
  • [x] @estebank
  • [x] @matthewjasper
  • [x] @nagisa
  • [x] @oli-obk
  • [x] @petrochenkov
  • [ ] @spastorino
  • [x] @wesleywiser

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot avatar Mar 30 '25 15:03 rfcbot

visited in meeting on Zulip

@rustbot label -I-compiler-nominated

apiraino avatar Apr 10 '25 09:04 apiraino

:bell: This is now entering its final comment period, as per the review above. :bell:

rfcbot avatar Jun 17 '25 16:06 rfcbot

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

rfcbot avatar Jun 27 '25 16:06 rfcbot