]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const_let_assign3.stderr
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / const_let_assign3.stderr
1 error[E0019]: constant function contains unimplemented expression type
2   --> $DIR/const_let_assign3.rs:9:9
3    |
4 LL |         self.state = x;
5    |         ^^^^^^^^^^^^^^
6
7 error[E0017]: references in constants may only refer to immutable values
8   --> $DIR/const_let_assign3.rs:16:5
9    |
10 LL |     s.foo(3);
11    |     ^ constants require immutable values
12
13 error[E0017]: references in constants may only refer to immutable values
14   --> $DIR/const_let_assign3.rs:22:13
15    |
16 LL |     let y = &mut x;
17    |             ^^^^^^ constants require immutable values
18
19 error[E0019]: constant contains unimplemented expression type
20   --> $DIR/const_let_assign3.rs:24:5
21    |
22 LL |     *y = 42;
23    |     ^^^^^^^
24
25 error: aborting due to 4 previous errors
26
27 Some errors have detailed explanations: E0017, E0019.
28 For more information about an error, try `rustc --explain E0017`.