]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/ranged_ints2_const.mirunsafeck.stderr
Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt
[rust.git] / tests / ui / unsafe / ranged_ints2_const.mirunsafeck.stderr
1 error[E0658]: mutable references are not allowed in constant functions
2   --> $DIR/ranged_ints2_const.rs:14: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:21: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[E0658]: mutable references are not allowed in constant functions
20   --> $DIR/ranged_ints2_const.rs:27:22
21    |
22 LL |     unsafe { let y = &mut x.0; }
23    |                      ^^^^^^^^
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
27
28 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
29   --> $DIR/ranged_ints2_const.rs:14:13
30    |
31 LL |     let y = &mut x.0;
32    |             ^^^^^^^^ mutation of layout constrained field
33    |
34    = note: mutating layout constrained fields cannot statically be checked for valid values
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`.