fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.2 KiB34 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[E0658]: 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   |
13   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
14   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
15
16error[E0658]: references in constants may only refer to immutable values
17  --> $DIR/const_let_assign3.rs:22:13
18   |
19LL |     let y = &mut x;
20   |             ^^^^^^ constants require immutable values
21   |
22   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
23   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
24
25error[E0019]: constant contains unimplemented expression type
26  --> $DIR/const_let_assign3.rs:24:5
27   |
28LL |     *y = 42;
29   |     ^^^^^^^
30
31error: aborting due to 4 previous errors
32
33Some errors have detailed explanations: E0019, E0658.
34For more information about an error, try `rustc --explain E0019`.