]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/anon-params-denied-2018.stderr
Update ui tests
[rust.git] / src / test / ui / anon-params-denied-2018.stderr
index 438bcf4274daaf0ab6e0c1dca14f6633b93ee5ef..3fcf41a9a60a2f2037b8f6339db1fd95fc214442 100644 (file)
@@ -1,10 +1,14 @@
-error: expected one of `:` or `@`, found `)`
+error: expected one of `:`, `@`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:6:15
    |
 LL |     fn foo(i32);
-   |               ^ expected one of `:` or `@` here
+   |               ^ expected one of `:`, `@`, or `|` here
    |
    = 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 was a parameter name, give it a type
    |
 LL |     fn foo(i32: TypeName);
@@ -14,13 +18,17 @@ help: if this is a type, explicitly ignore the parameter name
 LL |     fn foo(_: i32);
    |            ^^^^^^
 
-error: expected one of `:` or `@`, found `,`
+error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:8:36
    |
 LL |     fn bar_with_default_impl(String, String) {}
-   |                                    ^ expected one of `:` or `@` here
+   |                                    ^ expected one of `:`, `@`, or `|` here
    |
    = 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 was a parameter name, give it a type
    |
 LL |     fn bar_with_default_impl(String: TypeName, String) {}
@@ -30,11 +38,11 @@ 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 `)`
+error: expected one of `:`, `@`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:8:44
    |
 LL |     fn bar_with_default_impl(String, String) {}
-   |                                            ^ expected one of `:` or `@` here
+   |                                            ^ expected one of `:`, `@`, or `|` here
    |
    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
 help: if this was a parameter name, give it a type
@@ -46,11 +54,11 @@ 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 `,`
+error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:13:22
    |
 LL |     fn baz(a:usize, b, c: usize) -> usize {
-   |                      ^ expected one of `:` or `@` here
+   |                      ^ expected one of `:`, `@`, or `|` here
    |
    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
 help: if this was a parameter name, give it a type