summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/self-in-function-arg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/self-in-function-arg.rs')
-rw-r--r--tests/ui/parser/self-in-function-arg.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/parser/self-in-function-arg.rs b/tests/ui/parser/self-in-function-arg.rs
new file mode 100644
index 000000000..6172ffe1b
--- /dev/null
+++ b/tests/ui/parser/self-in-function-arg.rs
@@ -0,0 +1,3 @@
+fn foo(x:i32, self: i32) -> i32 { self } //~ ERROR unexpected `self` parameter in function
+
+fn main() {}