]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 2 | --> $DIR/feature-gate-const_fn_transmute.rs:11:43 |
f035d41b XL |
3 | | |
4 | LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } } | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
1b1a35ee XL |
7 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
8 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
9 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 10 | |
1b1a35ee | 11 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 12 | --> $DIR/feature-gate-const_fn_transmute.rs:14:53 |
f035d41b XL |
13 | | |
14 | LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } } | |
15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
16 | | | |
1b1a35ee XL |
17 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
18 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
19 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 20 | |
1b1a35ee | 21 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 22 | --> $DIR/feature-gate-const_fn_transmute.rs:17:58 |
f035d41b XL |
23 | | |
24 | LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } } | |
25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
26 | | | |
1b1a35ee XL |
27 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
28 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
29 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 30 | |
1b1a35ee | 31 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 32 | --> $DIR/feature-gate-const_fn_transmute.rs:20:48 |
f035d41b XL |
33 | | |
34 | LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) } | |
35 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
36 | | | |
1b1a35ee XL |
37 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
38 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
39 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 40 | |
1b1a35ee | 41 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 42 | --> $DIR/feature-gate-const_fn_transmute.rs:23:58 |
f035d41b XL |
43 | | |
44 | LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) } | |
45 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
46 | | | |
1b1a35ee XL |
47 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
48 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
49 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 50 | |
1b1a35ee | 51 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 52 | --> $DIR/feature-gate-const_fn_transmute.rs:26:63 |
f035d41b XL |
53 | | |
54 | LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) } | |
55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
56 | | | |
1b1a35ee XL |
57 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
58 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
59 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 60 | |
1b1a35ee | 61 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 62 | --> $DIR/feature-gate-const_fn_transmute.rs:29:39 |
f035d41b XL |
63 | | |
64 | LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) } | |
65 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
66 | | | |
1b1a35ee XL |
67 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
68 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
69 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 70 | |
1b1a35ee | 71 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 72 | --> $DIR/feature-gate-const_fn_transmute.rs:33:49 |
f035d41b XL |
73 | | |
74 | LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) } | |
75 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
76 | | | |
1b1a35ee XL |
77 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
78 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
79 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b | 80 | |
1b1a35ee | 81 | error[E0658]: `transmute` is not allowed in constant functions |
17df50a5 | 82 | --> $DIR/feature-gate-const_fn_transmute.rs:37:54 |
f035d41b XL |
83 | | |
84 | LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) } | |
85 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
86 | | | |
1b1a35ee XL |
87 | = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information |
88 | = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable | |
89 | = note: `transmute` is only allowed in constants and statics for now | |
f035d41b XL |
90 | |
91 | error[E0133]: call to unsafe function is unsafe and requires unsafe function or block | |
17df50a5 | 92 | --> $DIR/feature-gate-const_fn_transmute.rs:29:39 |
f035d41b XL |
93 | | |
94 | LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) } | |
95 | | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function | |
96 | | | |
97 | = note: consult the function's documentation for information on how to avoid undefined behavior | |
98 | ||
99 | error[E0133]: call to unsafe function is unsafe and requires unsafe function or block | |
17df50a5 | 100 | --> $DIR/feature-gate-const_fn_transmute.rs:33:49 |
f035d41b XL |
101 | | |
102 | LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) } | |
103 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function | |
104 | | | |
105 | = note: consult the function's documentation for information on how to avoid undefined behavior | |
106 | ||
107 | error[E0133]: call to unsafe function is unsafe and requires unsafe function or block | |
17df50a5 | 108 | --> $DIR/feature-gate-const_fn_transmute.rs:37:54 |
f035d41b XL |
109 | | |
110 | LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) } | |
111 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function | |
112 | | | |
113 | = note: consult the function's documentation for information on how to avoid undefined behavior | |
114 | ||
115 | error: aborting due to 12 previous errors | |
116 | ||
1b1a35ee | 117 | Some errors have detailed explanations: E0133, E0658. |
f035d41b | 118 | For more information about an error, try `rustc --explain E0133`. |