]> git.proxmox.com Git - rustc.git/blob - src/test/ui/unsafe/ranged_ints2_const.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / unsafe / ranged_ints2_const.stderr
1 error[E0658]: mutable references are not allowed in constant functions
2 --> $DIR/ranged_ints2_const.rs:11:13
3 |
4 LL | let y = &mut x.0;
5 | ^^^^^^^^
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
9
10 error[E0658]: mutable references are not allowed in constant functions
11 --> $DIR/ranged_ints2_const.rs:18:22
12 |
13 LL | let y = unsafe { &mut x.0 };
14 | ^^^^^^^^
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
18
19 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
20 --> $DIR/ranged_ints2_const.rs:11:13
21 |
22 LL | let y = &mut x.0;
23 | ^^^^^^^^ mutation of layout constrained field
24 |
25 = note: mutating layout constrained fields cannot statically be checked for valid values
26
27 error: aborting due to 3 previous errors
28
29 Some errors have detailed explanations: E0133, E0658.
30 For more information about an error, try `rustc --explain E0133`.