diff options
| author | gimbles <yusharora@protonmail.com> | 2022-10-10 16:53:13 +0530 |
|---|---|---|
| committer | gimbles <yusharora@protonmail.com> | 2022-10-10 16:53:13 +0530 |
| commit | 6071b4b8a64571312017d5eaba01276b90ffe0dc (patch) | |
| tree | 4ef5d687c4dfca9ab013a294feac76daa6a50132 /src/test/ui/parser | |
| parent | ab37a83ae2c829b8597bdcda8244964ebc60b495 (diff) | |
`let` is not allowed in struct field definitions
Co-authored-by: jyn514 <jyn514@gmail.com> Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/removed-syntax-field-let.stderr | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/ui/parser/removed-syntax-field-let.stderr b/src/test/ui/parser/removed-syntax-field-let.stderr index ab3d2056581..bd1b23f7e3b 100644 --- a/src/test/ui/parser/removed-syntax-field-let.stderr +++ b/src/test/ui/parser/removed-syntax-field-let.stderr @@ -1,10 +1,16 @@ error: expected identifier, found keyword `let` --> $DIR/removed-syntax-field-let.rs:2:5 | -LL | struct S { - | - while parsing this struct LL | let foo: (), | ^^^ expected identifier, found keyword + | + = note: the `let` keyword is not allowed in `struct` fields + = note: see <https://doc.rust-lang.org/book/ch05-01-defining-structs.html> for more information +help: remove the let, the `let` keyword is not allowed in struct field definitions + | +LL - let foo: (), +LL + foo: (), + | error: aborting due to previous error |
