]> git.lizzy.rs Git - rust.git/blob - tests/ui/did_you_mean/issue-38147-4.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / ui / did_you_mean / issue-38147-4.rs
1 struct Foo<'a> {
2     s: &'a mut String
3 }
4
5 fn f(x: usize, f: &Foo) {
6     f.s.push('x'); //~ ERROR cannot borrow `*f.s` as mutable, as it is behind a `&` reference
7 }
8
9 fn main() {}