]> git.lizzy.rs Git - rust.git/blob - tests/ui/did_you_mean/issue-38147-4.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[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() {}