From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/anon-params/anon-params-denied-2018.stderr | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 src/test/ui/anon-params/anon-params-denied-2018.stderr (limited to 'src/test/ui/anon-params/anon-params-denied-2018.stderr') diff --git a/src/test/ui/anon-params/anon-params-denied-2018.stderr b/src/test/ui/anon-params/anon-params-denied-2018.stderr new file mode 100644 index 000000000..bb60c898e --- /dev/null +++ b/src/test/ui/anon-params/anon-params-denied-2018.stderr @@ -0,0 +1,142 @@ +error: expected one of `:`, `@`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:6:15 + | +LL | fn foo(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 foo(self: i32); + | +++++ +help: if this is a parameter name, give it a type + | +LL | fn foo(i32: TypeName); + | ++++++++++ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn foo(_: i32); + | ++ + +error: expected one of `:`, `@`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:9:29 + | +LL | fn foo_with_ref(&mut 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 foo_with_ref(self: &mut i32); + | +++++ +help: if this is a parameter name, give it a type + | +LL | fn foo_with_ref(i32: &mut TypeName); + | ~~~~~~~~~~~~~~~~~~ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn foo_with_ref(_: &mut i32); + | ++ + +error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:12:47 + | +LL | fn foo_with_qualified_path(::Baz); + | ^ expected one of 8 possible tokens + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: explicitly ignore the parameter name + | +LL | fn foo_with_qualified_path(_: ::Baz); + | ~~~~~~~~~~~~~~~~~~ + +error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:15:56 + | +LL | fn foo_with_qualified_path_and_ref(&::Baz); + | ^ expected one of 8 possible tokens + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: explicitly ignore the parameter name + | +LL | fn foo_with_qualified_path_and_ref(_: &::Baz); + | ~~~~~~~~~~~~~~~~~~~ + +error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,` + --> $DIR/anon-params-denied-2018.rs:18:57 + | +LL | fn foo_with_multiple_qualified_paths(::Baz, ::Baz); + | ^ expected one of 8 possible tokens + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: explicitly ignore the parameter name + | +LL | fn foo_with_multiple_qualified_paths(_: ::Baz, ::Baz); + | ~~~~~~~~~~~~~~~~~~ + +error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:18:74 + | +LL | fn foo_with_multiple_qualified_paths(::Baz, ::Baz); + | ^ expected one of 8 possible tokens + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: explicitly ignore the parameter name + | +LL | fn foo_with_multiple_qualified_paths(::Baz, _: ::Baz); + | ~~~~~~~~~~~~~~~~~~ + +error: expected one of `:`, `@`, or `|`, found `,` + --> $DIR/anon-params-denied-2018.rs:22:36 + | +LL | fn bar_with_default_impl(String, String) {} + | ^ 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 bar_with_default_impl(self: String, String) {} + | +++++ +help: if this is a parameter name, give it a type + | +LL | fn bar_with_default_impl(String: TypeName, String) {} + | ++++++++++ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn bar_with_default_impl(_: String, String) {} + | ++ + +error: expected one of `:`, `@`, or `|`, found `)` + --> $DIR/anon-params-denied-2018.rs:22:44 + | +LL | fn bar_with_default_impl(String, String) {} + | ^ expected one of `:`, `@`, or `|` + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: if this is a parameter name, give it a type + | +LL | fn bar_with_default_impl(String, String: TypeName) {} + | ++++++++++ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn bar_with_default_impl(String, _: String) {} + | ++ + +error: expected one of `:`, `@`, or `|`, found `,` + --> $DIR/anon-params-denied-2018.rs:27:22 + | +LL | fn baz(a:usize, b, c: usize) -> usize { + | ^ expected one of `:`, `@`, or `|` + | + = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) +help: if this is a parameter name, give it a type + | +LL | fn baz(a:usize, b: TypeName, c: usize) -> usize { + | ++++++++++ +help: if this is a type, explicitly ignore the parameter name + | +LL | fn baz(a:usize, _: b, c: usize) -> usize { + | ++ + +error: aborting due to 9 previous errors + -- cgit v1.2.3