summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/issue-64252-self-type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/issue-64252-self-type.rs')
-rw-r--r--src/test/ui/suggestions/issue-64252-self-type.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/issue-64252-self-type.rs b/src/test/ui/suggestions/issue-64252-self-type.rs
new file mode 100644
index 000000000..128d5e85c
--- /dev/null
+++ b/src/test/ui/suggestions/issue-64252-self-type.rs
@@ -0,0 +1,14 @@
+// This test checks that a suggestion to add a `self: ` parameter name is provided
+// to functions where this is applicable.
+
+pub fn foo(Box<Self>) { }
+//~^ ERROR expected one of `:`, `@`, or `|`, found `<`
+
+struct Bar;
+
+impl Bar {
+ fn bar(Box<Self>) { }
+ //~^ ERROR expected one of `:`, `@`, or `|`, found `<`
+}
+
+fn main() { }