-
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
Fix ICE in improper_ctypes_definitions
lint with all-ZST transparent types
#87529
Conversation
struct TransparentCustomZst(()); | ||
extern "C" { | ||
fn good17(p: TransparentCustomZst); | ||
} |
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.
you could make the struct and extern fn pub to avoid warnings :)
LGTM, thanks for the follow-up! But I'm not part of t-compiler, so r? @nikomatsakis for the final review |
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.
Per @camelid's point, the behavior for "all ZST fields" seems incorrect.
@rustbot ready |
Triage: |
@JohnCSimon What exactly do you mean by this? I thought that's what the |
Ugh! Sorry @FabianWolff, reading now! |
@bors r+ |
📌 Commit 4e76c38 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…akis Fix ICE in `improper_ctypes_definitions` lint with all-ZST transparent types Fixes rust-lang#87496. There is also another function in the same file that looks fishy, but I haven't been able to produce an ICE there, and in any case, it's not related to rust-lang#87496: https://github.com/rust-lang/rust/blob/fd853c00e255559255885aadff9e93a1760c8728/compiler/rustc_lint/src/types.rs#L720-L734 r? `@JohnTitor`
…akis Fix ICE in `improper_ctypes_definitions` lint with all-ZST transparent types Fixes rust-lang#87496. There is also another function in the same file that looks fishy, but I haven't been able to produce an ICE there, and in any case, it's not related to rust-lang#87496: https://github.com/rust-lang/rust/blob/fd853c00e255559255885aadff9e93a1760c8728/compiler/rustc_lint/src/types.rs#L720-L734 r? ``@JohnTitor``
Rollup of 10 pull requests Successful merges: - rust-lang#86382 (Make diagnostics clearer for `?` operators) - rust-lang#87529 (Fix ICE in `improper_ctypes_definitions` lint with all-ZST transparent types) - rust-lang#88339 (Add TcpListener::into_incoming and IntoIncoming) - rust-lang#88735 (Don't lint about missing code examples in derived traits) - rust-lang#88751 (Couple of changes to FileSearch and SearchPath) - rust-lang#88883 (Move some tests to more reasonable directories - 7) - rust-lang#88887 (Const Deref) - rust-lang#88911 (Improve error message for type mismatch in generator arguments) - rust-lang#89014 (PassWrapper: handle separate Module*SanitizerPass) - rust-lang#89033 (Set the library path in sysroot-crates-are-unstable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #87496. There is also another function in the same file that looks fishy, but I haven't been able to produce an ICE there, and in any case, it's not related to #87496:
rust/compiler/rustc_lint/src/types.rs
Lines 720 to 734 in fd853c0
r? @JohnTitor