-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Gate repr(Rust)
correctly on non-ADT items
#129422
Conversation
@bors try |
Gate `repr(Rust)` correctly on non-ADT items rust-lang#114201 added `repr(Rust)` but didn't add any attribute validation to it like `repr(C)` has, to only allow it on ADT items. I consider this code to be nonsense, for example: ``` #[repr(Rust)] fn foo() {} ``` Reminder that it's different from `extern "Rust"`, which *is* valid on function items. But also this now disallows `repr(Rust)` on modules, impls, traits, etc. I'll crater it, if it looks bad then I'll add an FCW.
r? fmease |
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
[CRATER] Crater Rollup This is a " crater rollup" of: * rust-lang#126452 * rust-lang#128784 * rust-lang#129392 * rust-lang#129422 * rust-lang#129543 **What is a crater rollup?** It's simply a crater job that is run on all of the containing PRs *together*, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build. r? `@ghost`
[CRATER] Crater Rollup This is a " crater rollup" of: * rust-lang#126452 * rust-lang#128784 * rust-lang#129392 * rust-lang#129422 * rust-lang#129543 * rust-lang#129604 **What is a crater rollup?** It's simply a crater job that is run on all of the containing PRs *together*, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build. r? `@ghost`
[CRATER] Crater Rollup This is a " crater rollup" of: * rust-lang#126452 * rust-lang#128784 * rust-lang#129392 * rust-lang#129422 * rust-lang#129543 * rust-lang#129604 **What is a crater rollup?** It's simply a crater job that is run on all of the containing PRs *together*, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build. r? `@ghost`
📝 Configuration of the ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot p=1 (Bump priority is this will run quickly.) |
📝 Configuration of the ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Given that this is a single crate regression (https://crates.io/crates/list_tools/0.1.9-features) with no dependents, I'd say we should just break it. This is very obviously a bugfix. I would offer to put up a pull request to fix, but the crate seems to be hosted on some other code hosting site (gitee) that I don't have an account for. I have absolutely no idea what compelled the crate author to put |
I-lang-nominated
@nirenyang This PR will break your crate E.g., here: https://docs.rs/crate/list_tools/0.1.9-features/source/src/fasts.rs#10 (on |
T-lang said this specific issue was obvious to fix. @bors r=fmease rollup |
Gate `repr(Rust)` correctly on non-ADT items rust-lang#114201 added `repr(Rust)` but didn't add any attribute validation to it like `repr(C)` has, to only allow it on ADT items. I consider this code to be nonsense, for example: ``` #[repr(Rust)] fn foo() {} ``` Reminder that it's different from `extern "Rust"`, which *is* valid on function items. But also this now disallows `repr(Rust)` on modules, impls, traits, etc. I'll crater it, if it looks bad then I'll add an FCW. --- https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#97524 (Add `Thread::{into_raw, from_raw}`) - rust-lang#127988 (Do not ICE with incorrect empty suggestion) - rust-lang#129422 (Gate `repr(Rust)` correctly on non-ADT items) - rust-lang#129934 (Win: Open dir for sync access in remove_dir_all) - rust-lang#130450 (Reduce confusion about `make_indirect_byval` by renaming it) - rust-lang#130476 (Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`) - rust-lang#130487 (Update the minimum external LLVM to 18) - rust-lang#130513 (Clarify docs for std::fs::File::write) - rust-lang#130522 ([Clippy] Swap `manual_retain` to use diagnostic items instead of paths) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129422 - compiler-errors:repr-rust, r=fmease Gate `repr(Rust)` correctly on non-ADT items rust-lang#114201 added `repr(Rust)` but didn't add any attribute validation to it like `repr(C)` has, to only allow it on ADT items. I consider this code to be nonsense, for example: ``` #[repr(Rust)] fn foo() {} ``` Reminder that it's different from `extern "Rust"`, which *is* valid on function items. But also this now disallows `repr(Rust)` on modules, impls, traits, etc. I'll crater it, if it looks bad then I'll add an FCW. --- https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).
#114201 added
repr(Rust)
but didn't add any attribute validation to it likerepr(C)
has, to only allow it on ADT items.I consider this code to be nonsense, for example:
Reminder that it's different from
extern "Rust"
, which is valid on function items. But also this now disallowsrepr(Rust)
on modules, impls, traits, etc.I'll crater it, if it looks bad then I'll add an FCW.
relnotesMarks issues that should be documented in the release notes of the next release.
: Compatibility (minor breaking change).