summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0185.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/error-codes/E0185.rs')
-rw-r--r--src/test/ui/error-codes/E0185.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0185.rs b/src/test/ui/error-codes/E0185.rs
new file mode 100644
index 000000000..45eb8b0f2
--- /dev/null
+++ b/src/test/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() {
+}