1 struct Pass<'a> {
2     s: &'a mut String
3 }
4 
5 impl<'a> Pass<'a> {
f(&mut self)6     fn f(&mut self) {
7         self.s.push('x');
8     }
9 }
10 
11 struct Foo<'a> {
12     s: &'a mut String
13 }
14 
15 impl<'a> Foo<'a> {
f(&self)16     fn f(&self) {
17         self.s.push('x'); //~ cannot borrow `*self.s` as mutable, as it is behind a `&` reference
18     }
19 }
20 
main()21 fn main() {}
22