]> git.proxmox.com Git - rustc.git/blame - tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / consts / miri_unleashed / mutable_references_err.32bit.stderr
CommitLineData
29967ef6 1error[E0080]: it is undefined behavior to use this value
2b03887a 2 --> $DIR/mutable_references_err.rs:15:1
f9f354fc 3 |
064997fb
FG
4LL | const MUH: Meh = Meh {
5 | ^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in a `const`
29967ef6
XL
6 |
7 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5 8 = note: the raw bytes of the constant (size: 4, align: 4) {
ed00b5ec 9 ╾ALLOC0╼ │ ╾──╼
cdc7bbd5 10 }
f9f354fc 11
29967ef6 12error[E0080]: it is undefined behavior to use this value
2b03887a 13 --> $DIR/mutable_references_err.rs:25:1
f9f354fc
XL
14 |
15LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
064997fb 16 | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in a `const`
29967ef6
XL
17 |
18 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5 19 = note: the raw bytes of the constant (size: 8, align: 4) {
ed00b5ec 20 ╾ALLOC1╼ ╾ALLOC2╼ │ ╾──╼╾──╼
cdc7bbd5 21 }
f9f354fc 22
29967ef6 23error[E0080]: it is undefined behavior to use this value
2b03887a 24 --> $DIR/mutable_references_err.rs:29:1
f9f354fc
XL
25 |
26LL | const BLUNT: &mut i32 = &mut 42;
064997fb 27 | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference in a `const`
29967ef6
XL
28 |
29 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5 30 = note: the raw bytes of the constant (size: 4, align: 4) {
ed00b5ec 31 ╾ALLOC3╼ │ ╾──╼
cdc7bbd5 32 }
f9f354fc
XL
33
34warning: skipping const checks
35 |
36help: skipping check that does not even have a feature gate
2b03887a 37 --> $DIR/mutable_references_err.rs:16:8
f9f354fc
XL
38 |
39LL | x: &UnsafeCell::new(42),
40 | ^^^^^^^^^^^^^^^^^^^^
41help: skipping check that does not even have a feature gate
2b03887a 42 --> $DIR/mutable_references_err.rs:25:27
f9f354fc
XL
43 |
44LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1b1a35ee 46help: skipping check that does not even have a feature gate
2b03887a 47 --> $DIR/mutable_references_err.rs:29:25
f9f354fc
XL
48 |
49LL | const BLUNT: &mut i32 = &mut 42;
50 | ^^^^^^^
51
52error: aborting due to 3 previous errors; 1 warning emitted
53
29967ef6 54For more information about this error, try `rustc --explain E0080`.