error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-4.rs:6:5 | LL | fn f(x: usize, f: &Foo) { | ---- use `&mut Foo` here to make mutable LL | f.s.push('x'); //~ ERROR cannot borrow data mutably | ^^^ assignment into an immutable reference error: aborting due to previous error For more information about this error, try `rustc --explain E0389`.