rust/tests/ui/pattern/at-in-struct-patterns.stderr
Sasha Pourcelot 5c4b61b4b4 don't uppercase error messages
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.
2025-09-03 15:24:49 +02:00

70 lines
2.0 KiB
Plaintext

error: unexpected `@` in struct pattern
--> $DIR/at-in-struct-patterns.rs:8:15
|
LL | let Foo { var @ field1, .. } = foo;
| --- ^^^^^
| |
| while parsing the fields for this pattern
|
= note: struct patterns use `field: pattern` syntax to bind to fields
= help: consider replacing `new_name @ field_name` with `field_name: new_name` if that is what you intended
error: `@ ..` is not supported in struct patterns
--> $DIR/at-in-struct-patterns.rs:10:26
|
LL | let Foo { field1: _, bar @ .. } = foo;
| --- ^^^^^^^^
| |
| while parsing the fields for this pattern
|
help: bind to each field separately or, if you don't need them, just remove `bar @`
|
LL - let Foo { field1: _, bar @ .. } = foo;
LL + let Foo { field1: _, .. } = foo;
|
error: `@ ..` is not supported in struct patterns
--> $DIR/at-in-struct-patterns.rs:11:15
|
LL | let Foo { bar @ .. } = foo;
| --- ^^^^^^^^
| |
| while parsing the fields for this pattern
|
help: bind to each field separately or, if you don't need them, just remove `bar @`
|
LL - let Foo { bar @ .. } = foo;
LL + let Foo { .. } = foo;
|
error: expected identifier, found `@`
--> $DIR/at-in-struct-patterns.rs:12:15
|
LL | let Foo { @ } = foo;
| --- ^ expected identifier
| |
| while parsing the fields for this pattern
error: expected identifier, found `@`
--> $DIR/at-in-struct-patterns.rs:13:15
|
LL | let Foo { @ .. } = foo;
| --- ^ expected identifier
| |
| while parsing the fields for this pattern
error[E0425]: cannot find value `var` in this scope
--> $DIR/at-in-struct-patterns.rs:9:10
|
LL | dbg!(var);
| ^^^ not found in this scope
|
help: consider importing this function
|
LL + use std::env::var;
|
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0425`.