|
1 |
| -error[E0658]: references in constants may only refer to immutable values |
| 1 | +error[E0019]: mutable references are not allowed in constants |
2 | 2 | --> $DIR/const_mut_refs.rs:31:17
|
3 | 3 | |
|
4 | 4 | LL | let _: [(); foo().bar()] = [(); 1];
|
5 |
| - | ^^^^^ constants require immutable values |
6 |
| - | |
7 |
| - = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information |
8 |
| - = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable |
| 5 | + | ^^^^^ `&mut` is only allowed in `const fn` |
9 | 6 |
|
10 |
| -error[E0658]: references in constants may only refer to immutable values |
| 7 | +error[E0019]: mutable references are not allowed in constants |
11 | 8 | --> $DIR/const_mut_refs.rs:33:21
|
12 | 9 | |
|
13 | 10 | LL | let _: [(); baz(&mut foo())] = [(); 2];
|
14 |
| - | ^^^^^^^^^^ constants require immutable values |
15 |
| - | |
16 |
| - = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information |
17 |
| - = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable |
| 11 | + | ^^^^^^^^^^ `&mut` is only allowed in `const fn` |
18 | 12 |
|
19 |
| -error[E0658]: references in constants may only refer to immutable values |
| 13 | +error[E0019]: mutable references are not allowed in constants |
20 | 14 | --> $DIR/const_mut_refs.rs:35:22
|
21 | 15 | |
|
22 | 16 | LL | let _: [(); bazz(&mut foo())] = [(); 3];
|
23 |
| - | ^^^^^^^^^^ constants require immutable values |
24 |
| - | |
25 |
| - = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information |
26 |
| - = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable |
| 17 | + | ^^^^^^^^^^ `&mut` is only allowed in `const fn` |
27 | 18 |
|
28 | 19 | error: aborting due to 3 previous errors
|
29 | 20 |
|
30 |
| -For more information about this error, try `rustc --explain E0658`. |
| 21 | +For more information about this error, try `rustc --explain E0019`. |
0 commit comments