blob: 40b8e0dba26a3dfeff034ac755059689f52e1b6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
struct Qux<'a> {
s: &'a String
}
impl<'a> Qux<'a> {
fn f(&self) {
self.s.push('x');
//~^ ERROR cannot borrow `*self.s` as mutable, as it is behind a `&` reference
}
}
fn main() {}
|