blob: 39a55190b17deed7328383bfe2bbe25c6a154aa3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
error: mutable references in const fn are unstable
--> $DIR/ranged_ints2_const.rs:11:9
|
LL | let y = &mut x.0; //~ ERROR references in const fn are unstable
| ^
error: mutable references in const fn are unstable
--> $DIR/ranged_ints2_const.rs:18:9
|
LL | let y = unsafe { &mut x.0 }; //~ ERROR mutable references in const fn are unstable
| ^
error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
--> $DIR/ranged_ints2_const.rs:11:13
|
LL | let y = &mut x.0; //~ ERROR references in const fn are unstable
| ^^^^^^^^ mutation of layout constrained field
|
= note: mutating layout constrained fields cannot statically be checked for valid values
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0133`.
|