]> 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 a58998e4891e09e38f5abc6c4d04277f454e4ff2..3fcf41a9a60a2f2037b8f6339db1fd95fc214442 100644 (file)
@@ -5,6 +5,10 @@ LL |     fn foo(i32);
    |               ^ 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);
@@ -21,6 +25,10 @@ LL |     fn bar_with_default_impl(String, String) {}
    |                                    ^ 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) {}