diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/parser/inverted-parameters.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/parser/inverted-parameters.stderr')
-rw-r--r-- | src/test/ui/parser/inverted-parameters.stderr | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/test/ui/parser/inverted-parameters.stderr b/src/test/ui/parser/inverted-parameters.stderr new file mode 100644 index 000000000..866227782 --- /dev/null +++ b/src/test/ui/parser/inverted-parameters.stderr @@ -0,0 +1,61 @@ +error: expected one of `:`, `@`, or `|`, found `bar` + --> $DIR/inverted-parameters.rs:4:24 + | +LL | fn foo(&self, &str bar) {} + | -----^^^ + | | | + | | expected one of `:`, `@`, or `|` + | help: declare the type after the parameter binding: `<identifier>: <type>` + +error: expected one of `:`, `@`, or `|`, found `quux` + --> $DIR/inverted-parameters.rs:10:10 + | +LL | fn baz(S quux, xyzzy: i32) {} + | --^^^^ + | | | + | | expected one of `:`, `@`, or `|` + | help: declare the type after the parameter binding: `<identifier>: <type>` + +error: expected one of `:`, `@`, or `|`, found `a` + --> $DIR/inverted-parameters.rs:15:12 + | +LL | fn one(i32 a b) {} + | ^ expected one of `:`, `@`, or `|` + +error: expected one of `:` or `|`, found `(` + --> $DIR/inverted-parameters.rs:18:23 + | +LL | fn pattern((i32, i32) (a, b)) {} + | ^ expected one of `:` or `|` + +error: expected one of `:`, `@`, or `|`, found `)` + --> $DIR/inverted-parameters.rs:21:12 + | +LL | fn fizz(i32) {} + | ^ expected one of `:`, `@`, or `|` + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: if this is a `self` type, give it a parameter name + | +LL | fn fizz(self: i32) {} + | +++++ +help: if this is a parameter name, give it a type + | +LL | fn fizz(i32: TypeName) {} + | ++++++++++ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn fizz(_: i32) {} + | ++ + +error: expected one of `:`, `@`, or `|`, found `S` + --> $DIR/inverted-parameters.rs:27:23 + | +LL | fn missing_colon(quux S) {} + | -----^ + | | | + | | expected one of `:`, `@`, or `|` + | help: declare the type after the parameter binding: `<identifier>: <type>` + +error: aborting due to 6 previous errors + |