Fix feature gate for repr(simd)#158523
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_attr_parsing |
e113cdf to
c5388d8
Compare
|
@rustbot ready |
|
Makes sense to me. Thanks for cleaning this up. @rfcbot fcp merge lang |
|
@traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: 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! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
@rfcbot reviewed |
|
Took a moment to realize that this is both no longer allowing Looks fine, though. |
|
I was pondering whether this is clearly a bug and thus we should just skip the 10-day wait since the branch is Friday(?). Mark pointed out that it's already on stable, though, so if it waits another release it's no big deal. |
We do currently allow the other repr variants on macro calls #[repr(C)]
println!();with the same "1.91 ..= beta give no diagnostic output" problem. I'm currently running crater on that (#158816), any breakage from this PR should also show up in it. |
|
I could not find any |
|
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. |
|
@bors r=mejrs rollup |
|
📋 This PR cannot be approved because it currently has the following label: |
|
@bors r=mejrs rollup |
…uwer Rollup of 14 pull requests Successful merges: - #159126 (Fix PR number in bootstrap's change tracker) - #155811 (Include AtomicU128/AtomicI128 in docs for any target) - #156968 (diagnostics: suggest generic_const_args for const ops) - #159012 (Shrink mir::Statement to 40 bytes) - #156618 (rustdoc: test ignoring rustc lints in CLI) - #158182 (std: use `OnceLock` for SGX argument storage) - #159114 (Add regression test for $-prefixed fragment specifier in repetition) - #158523 (Fix feature gate for `repr(simd)`) - #158876 (Fix multiple logic bugs in `Arc::make_mut`) - #158928 (std: fix Xous UDP send_to length mismatch and truncation) - #159060 (Look for the cdb architecture that corresponds to the target triple) - #159089 (riscv: update c-variadic test for LLVM changes) - #159093 (pretty-print: use inline asm's actual macro name) - #159122 (doc: use ptr::addr in offset_from docs) Failed merges: - #158732 (Apply MCP 1003 and move diagnostics.rs into its own module)
Rollup merge of #158523 - JonathanBrouwer:repr_simd, r=mejrs Fix feature gate for `repr(simd)` The following code currently compiles on stable rust: ```rust #[repr(simd)] println!() ``` This has the following behavior: - 1.90 and earlier give an "unused attribute warning" - 1.91 ..= beta give no diagnostic output - nightly gives the following: ``` warning: `#[repr(simd)]` attribute cannot be used on macro calls --> src/main.rs:4:5 | 4 | #[repr(simd)] | ^^^^^^^^^^^^^ | = help: `#[repr(simd)]` can only be applied to structs = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default ``` This PR changes this to a feature gate **error**. r? @mejrs
The following code currently compiles on stable rust:
This has the following behavior:
This PR changes this to a feature gate error.
r? @mejrs