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