summary refs log tree commit diff
path: root/src/test/ui/immut-function-arguments.ast.stderr
blob: f371a13cd4d2574d73d7797428f1aecad5e59004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0594]: cannot assign to immutable `Box` content `*y`
  --> $DIR/immut-function-arguments.rs:5:5
   |
LL | fn f(y: Box<isize>) {
   |      - help: make this binding mutable: `mut y`
LL |     *y = 5;
   |     ^^^^^^ cannot borrow as mutable

error[E0594]: cannot assign to immutable `Box` content `*q`
  --> $DIR/immut-function-arguments.rs:10:35
   |
LL |     let _frob = |q: Box<isize>| { *q = 2; };
   |                  -                ^^^^^^ cannot borrow as mutable
   |                  |
   |                  help: make this binding mutable: `mut q`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0594`.