about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0186.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0186.rs')
-rw-r--r--tests/ui/error-codes/E0186.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0186.rs b/tests/ui/error-codes/E0186.rs
new file mode 100644
index 00000000000..83ef78ef2c0
--- /dev/null
+++ b/tests/ui/error-codes/E0186.rs
@@ -0,0 +1,13 @@
+trait Foo {
+    fn foo(&self); //~ `&self` used in trait
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn foo() {} //~ ERROR E0186
+    //~^ expected `&self` in impl
+}
+
+fn main() {
+}