-
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
Safe Transmute: Use 'not yet supported', not 'unspecified' in errors #122560
Conversation
rustc_transmute::Reason::SrcIsUnspecified => { | ||
format!("`{src}` does not have a well-specified layout") | ||
rustc_transmute::Reason::SrcIsNotYetSupported => { | ||
format!("Analyzing the transmutability of `{src}` is not yet supported.") |
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.
nitpick but there shouldn't be any capital letter at the start of any diagnostic message
format!("Analyzing the transmutability of `{src}` is not yet supported.") | |
format!("analyzing the transmutability of `{src}` is not yet supported.") |
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.
Fixed.
rustc_transmute::Reason::DstIsUnspecified => { | ||
format!("`{dst}` does not have a well-specified layout") | ||
rustc_transmute::Reason::DstIsNotYetSupported => { | ||
format!("Analyzing the transmutability of `{dst}` is not yet supported.") |
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.
format!("Analyzing the transmutability of `{dst}` is not yet supported.") | |
format!("analyzing the transmutability of `{dst}` is not yet supported.") |
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.
Fixed
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.
@Urgau is correct
We can (and will) support analyzing the transmutability of types whose layouts aren't completely specified by its repr. This change ensures that the error messages remain sensible after this support lands.
0f0883a
to
dc35339
Compare
I've fixed the uppercased diagnostics changed by this PR. It looks like several other of our diagnostics start with uppercased letters; I'll correct those in a follow-up PR. |
Could you just fix it in this PR? No reason to make another PR, since it'll just be blessing some tests. |
Done |
@bors r+ rollup |
…ler-errors Safe Transmute: Use 'not yet supported', not 'unspecified' in errors We can (and will) support analyzing the transmutability of types whose layouts aren't completely specified by its repr. This change ensures that the error messages remain sensible after this support lands. r? `@compiler-errors`
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#122254 (Detect calls to .clone() on T: !Clone types on borrowck errors) - rust-lang#122495 (Visually mark 👻hidden👻 items with document-hidden-items) - rust-lang#122543 (Add `#![rustc_never_type_mode = "..."]` crate-level attribute to allow experimenting) - rust-lang#122560 (Safe Transmute: Use 'not yet supported', not 'unspecified' in errors) - rust-lang#122562 (Mention labelled blocks in `break` docs) - rust-lang#122563 (CI: cache PR CI Docker builds) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122560 - jswrenn:not-yet-supported, r=compiler-errors Safe Transmute: Use 'not yet supported', not 'unspecified' in errors We can (and will) support analyzing the transmutability of types whose layouts aren't completely specified by its repr. This change ensures that the error messages remain sensible after this support lands. r? ``@compiler-errors``
We can (and will) support analyzing the transmutability of types whose layouts aren't completely specified by its repr. This change ensures that the error messages remain sensible after this support lands.
r? @compiler-errors