mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00

a more general version of https://github.com/rust-lang/rust/pull/146080. after a bit of hacking in [`fluent.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_fluent_macro/src/fluent.rs), i discovered that i'm not the only one that is bad at following guidelines 😅. this pr lowercases the first letter of all the error messages in the codebase. (i did not change things that are traditionally uppercased such as _MIR_, _ABI_ or _C_) i think it's reasonable to run a `@bors try` so all the test suite is checked, as i cannot run some of the tests on my machine. i double checked (and replaced manually) all the old error messages, but better be safe than sorry. in the future i will try to add a check in `x test tidy` that errors if an error message starts with an uppercase letter.
71 lines
3.1 KiB
Plaintext
71 lines
3.1 KiB
Plaintext
error[E0080]: reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x4], and this operation requires initialized memory
|
|
--> $DIR/invalid-patterns.rs:40:32
|
|
|
|
|
LL | get_flag::<false, { unsafe { char_raw.character } }>();
|
|
| ^^^^^^^^^^^^^^^^^^ evaluation of `main::{constant#7}` failed here
|
|
|
|
|
= note: the raw bytes of the constant (size: 4, align: 4) {
|
|
ff __ __ __ │ .░░░
|
|
}
|
|
|
|
error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
|
|
--> $DIR/invalid-patterns.rs:42:14
|
|
|
|
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
|
|
|
|
|
= note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 1, align: 1) {
|
|
42 │ B
|
|
}
|
|
|
|
error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
|
|
--> $DIR/invalid-patterns.rs:44:14
|
|
|
|
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
|
|
|
|
|
= note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 1, align: 1) {
|
|
42 │ B
|
|
}
|
|
|
|
error[E0080]: reading memory at ALLOC1[0x0..0x4], but memory is uninitialized at [0x1..0x4], and this operation requires initialized memory
|
|
--> $DIR/invalid-patterns.rs:44:58
|
|
|
|
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
|
|
| ^^^^^^^^^^^^^^^^^^ evaluation of `main::{constant#11}` failed here
|
|
|
|
|
= note: the raw bytes of the constant (size: 4, align: 4) {
|
|
ff __ __ __ │ .░░░
|
|
}
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/invalid-patterns.rs:31:21
|
|
|
|
|
LL | get_flag::<false, 0xFF>();
|
|
| ^^^^ expected `char`, found `u8`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/invalid-patterns.rs:33:14
|
|
|
|
|
LL | get_flag::<7, 'c'>();
|
|
| ^ expected `bool`, found integer
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/invalid-patterns.rs:35:14
|
|
|
|
|
LL | get_flag::<42, 0x5ad>();
|
|
| ^^ expected `bool`, found integer
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/invalid-patterns.rs:35:18
|
|
|
|
|
LL | get_flag::<42, 0x5ad>();
|
|
| ^^^^^ expected `char`, found `u8`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
Some errors have detailed explanations: E0080, E0308.
|
|
For more information about an error, try `rustc --explain E0080`.
|