summaryrefslogtreecommitdiffstats
path: root/src/test/ui/invalid-self-argument/bare-fn-start.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn-start.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.rs b/src/test/ui/invalid-self-argument/bare-fn-start.rs
new file mode 100644
index 000000000..7c580bc5a
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/bare-fn-start.rs
@@ -0,0 +1,6 @@
+fn a(&self) { }
+//~^ ERROR `self` parameter is only allowed in associated functions
+//~| NOTE not semantically valid as function parameter
+//~| NOTE associated functions are those in `impl` or `trait` definitions
+
+fn main() { }