]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const_let_assign3.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.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 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
8
9 error[E0764]: mutable references are not allowed in constants
10 --> $DIR/const_let_assign3.rs:16:5
11 |
12 LL | s.foo(3);
13 | ^ `&mut` is only allowed in `const fn`
14
15 error[E0764]: mutable references are not allowed in constants
16 --> $DIR/const_let_assign3.rs:22:13
17 |
18 LL | let y = &mut x;
19 | ^^^^^^ `&mut` is only allowed in `const fn`
20
21 error[E0019]: constant contains unimplemented expression type
22 --> $DIR/const_let_assign3.rs:24:5
23 |
24 LL | *y = 42;
25 | ^^^^^^^
26 |
27 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
28
29 error: aborting due to 4 previous errors
30
31 Some errors have detailed explanations: E0019, E0764.
32 For more information about an error, try `rustc --explain E0019`.