]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/ranged_ints2_const.thirunsafeck.stderr
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / unsafe / ranged_ints2_const.thirunsafeck.stderr
1 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
2   --> $DIR/ranged_ints2_const.rs:14:13
3    |
4 LL |     let y = &mut x.0;
5    |             ^^^^^^^^ mutation of layout constrained field
6    |
7    = note: mutating layout constrained fields cannot statically be checked for valid values
8
9 error[E0658]: mutable references are not allowed in constant functions
10   --> $DIR/ranged_ints2_const.rs:14:13
11    |
12 LL |     let y = &mut x.0;
13    |             ^^^^^^^^
14    |
15    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
16    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
17
18 error[E0658]: mutable references are not allowed in constant functions
19   --> $DIR/ranged_ints2_const.rs:21:22
20    |
21 LL |     let y = unsafe { &mut x.0 };
22    |                      ^^^^^^^^
23    |
24    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
25    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
26
27 error[E0658]: mutable references are not allowed in constant functions
28   --> $DIR/ranged_ints2_const.rs:27:22
29    |
30 LL |     unsafe { let y = &mut x.0; }
31    |                      ^^^^^^^^
32    |
33    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
34    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
35
36 error: aborting due to 4 previous errors
37
38 Some errors have detailed explanations: E0133, E0658.
39 For more information about an error, try `rustc --explain E0133`.