summary refs log tree commit diff
path: root/src/test/ui/consts/const_let_assign3.stderr
blob: 62fd04ea522c3326e626b90b399a248e9b1b4f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error[E0019]: constant function contains unimplemented expression type
  --> $DIR/const_let_assign3.rs:9:9
   |
LL |         self.state = x;
   |         ^^^^^^^^^^^^^^
   |
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0658]: references in constants may only refer to immutable values
  --> $DIR/const_let_assign3.rs:16:5
   |
LL |     s.foo(3);
   |     ^ constants require immutable values
   |
   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0658]: references in constants may only refer to immutable values
  --> $DIR/const_let_assign3.rs:22:13
   |
LL |     let y = &mut x;
   |             ^^^^^^ constants require immutable values
   |
   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0019]: constant contains unimplemented expression type
  --> $DIR/const_let_assign3.rs:24:5
   |
LL |     *y = 42;
   |     ^^^^^^^
   |
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0019, E0658.
For more information about an error, try `rustc --explain E0019`.