summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/issue-93078.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/borrowck/issue-93078.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/borrowck/issue-93078.rs b/tests/ui/borrowck/issue-93078.rs
new file mode 100644
index 000000000..2e608c5db
--- /dev/null
+++ b/tests/ui/borrowck/issue-93078.rs
@@ -0,0 +1,15 @@
+trait Modify {
+ fn modify(&mut self) ;
+}
+
+impl<T> Modify for T {
+ fn modify(&mut self) {}
+}
+
+trait Foo {
+ fn mute(&mut self) {
+ self.modify(); //~ ERROR cannot borrow `self` as mutable
+ }
+}
+
+fn main() {}