-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Port #[macro_export] to the new attribute parsing infrastructure #143857
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
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
@@ -26,12 +22,15 @@ macro_rules! d { | |||
} | |||
|
|||
#[macro_export()] | |||
//~^ ERROR malformed `macro_export` attribute input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change! Malformed macro_export attributes have had a lint since 2023 (deny(invalid_macro_export_arguments)
). This PR makes this an error.
Furthermore, #[macro_export()]
has been accepted since 2023, and this PR makes that an error too.
As discussed in #142838 (comment), we can make breaking changes as long as we do a crater run. So this PR needs a crater run.
This comment has been minimized.
This comment has been minimized.
12474a6
to
bb6c5dd
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #140717) made this pull request unmergeable. Please resolve the merge conflicts. |
@Periodic1911 if you rebase I'll run a crater |
@rust-lang/lang this makes a long-standing warning an error with a crater run. Just wanted to notify you |
bb6c5dd
to
92071cc
Compare
92071cc
to
ac1f122
Compare
@bors try |
Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for #131229 (comment) r? `@oli-obk` cc `@JonathanBrouwer` `@jdonszelmann`
☀️ Try build successful - checks-actions |
@craterbot check |
This comment has been minimized.
This comment has been minimized.
7a67892
to
90fad60
Compare
…zelmann Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? `@oli-obk` cc `@JonathanBrouwer` `@jdonszelmann`
Rollup of 14 pull requests Successful merges: - #143857 (Port #[macro_export] to the new attribute parsing infrastructure) - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition) - #144070 (Implement `hash_map` macro ) - #144322 (Add lint against dangling pointers from local variables) - #144443 (Make target pointer width in target json an integer) - #144667 (`AlignmentEnum` should just be `repr(usize)` now) - #144779 (Implement debugging output of the bootstrap Step graph into a DOT file) - #144790 (Multiple bounds checking elision failures) - #144794 (Port `#[coroutine]` to the new attribute system) - #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits) - #144816 (Update E0562 to account for the new impl trait positions) - #144822 (Return a struct with named fields from `hash_owner_nodes`) - #144824 (Updated test links in compiler) - #144829 (Use full flag name in strip command for Darwin) r? `@ghost` `@rustbot` modify labels: rollup
…zelmann Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? ``@oli-obk`` cc ``@JonathanBrouwer`` ``@jdonszelmann``
Rollup of 13 pull requests Successful merges: - #143857 (Port #[macro_export] to the new attribute parsing infrastructure) - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition) - #144070 (Implement `hash_map` macro ) - #144322 (Add lint against dangling pointers from local variables) - #144443 (Make target pointer width in target json an integer) - #144667 (`AlignmentEnum` should just be `repr(usize)` now) - #144790 (Multiple bounds checking elision failures) - #144794 (Port `#[coroutine]` to the new attribute system) - #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits) - #144816 (Update E0562 to account for the new impl trait positions) - #144822 (Return a struct with named fields from `hash_owner_nodes`) - #144824 (Updated test links in compiler) - #144829 (Use full flag name in strip command for Darwin) r? `@ghost` `@rustbot` modify labels: rollup
…zelmann Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? ```@oli-obk``` cc ```@JonathanBrouwer``` ```@jdonszelmann```
Rollup of 13 pull requests Successful merges: - #143857 (Port #[macro_export] to the new attribute parsing infrastructure) - #144070 (Implement `hash_map` macro ) - #144322 (Add lint against dangling pointers from local variables) - #144667 (`AlignmentEnum` should just be `repr(usize)` now) - #144678 (Make no_mangle on foreign items explicit instead of implicit) - #144790 (Multiple bounds checking elision failures) - #144794 (Port `#[coroutine]` to the new attribute system) - #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding) - #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits) - #144816 (Update E0562 to account for the new impl trait positions) - #144822 (Return a struct with named fields from `hash_owner_nodes`) - #144824 (Updated test links in compiler) - #144829 (Use full flag name in strip command for Darwin) r? `@ghost` `@rustbot` modify labels: rollup
@@ -360,6 +360,9 @@ pub enum AttributeKind { | |||
/// Represents `#[macro_escape]`. | |||
MacroEscape(Span), | |||
|
|||
/// Represents [`#[macro_export}`](https://doc.rust-lang.org/reference/macros-by-example.html#r-macro.decl.scope.path). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Typo here; }
should be ]
.
…zelmann Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? `@oli-obk` cc `@JonathanBrouwer` `@jdonszelmann`
Rollup of 13 pull requests Successful merges: - #143857 (Port #[macro_export] to the new attribute parsing infrastructure) - #144070 (Implement `hash_map` macro ) - #144322 (Add lint against dangling pointers from local variables) - #144667 (`AlignmentEnum` should just be `repr(usize)` now) - #144706 (Do not give function allocations alignment in consteval and Miri.) - #144790 (Multiple bounds checking elision failures) - #144794 (Port `#[coroutine]` to the new attribute system) - #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding) - #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits) - #144816 (Update E0562 to account for the new impl trait positions) - #144822 (Return a struct with named fields from `hash_owner_nodes`) - #144824 (Updated test links in compiler) - #144829 (Use full flag name in strip command for Darwin) r? `@ghost` `@rustbot` modify labels: rollup
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
@Periodic1911 feel free to r=me again whenever, after rebase |
90fad60
to
23e6be2
Compare
Ports macro_export to the new attribute parsing infrastructure for #131229 (comment)
r? @oli-obk
cc @JonathanBrouwer @jdonszelmann