fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
854 B28 linesraw
1error[E0019]: constant function contains unimplemented expression type
2  --> $DIR/const_let_assign3.rs:9:9
3   |
4LL |         self.state = x;
5   |         ^^^^^^^^^^^^^^
6
7error[E0017]: references in constants may only refer to immutable values
8  --> $DIR/const_let_assign3.rs:16:5
9   |
10LL |     s.foo(3);
11   |     ^ constants require immutable values
12
13error[E0017]: references in constants may only refer to immutable values
14  --> $DIR/const_let_assign3.rs:22:13
15   |
16LL |     let y = &mut x;
17   |             ^^^^^^ constants require immutable values
18
19error[E0019]: constant contains unimplemented expression type
20  --> $DIR/const_let_assign3.rs:24:5
21   |
22LL |     *y = 42;
23   |     ^^^^^^^
24
25error: aborting due to 4 previous errors
26
27Some errors have detailed explanations: E0017, E0019.
28For more information about an error, try `rustc --explain E0017`.