rust/tests/ui/borrowck/issue-93078.rs
2023-01-11 09:32:08 +00:00

16 lines
225 B
Rust

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() {}