|
1 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 1 | +error[E0658]: `transmute` is not allowed in constant functions |
2 | 2 | --> $DIR/feature-gate-const_fn_transmute.rs:8:43 |
3 | 3 | | |
4 | 4 | LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } } |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^ |
6 | 6 | | |
7 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
8 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
9 | 10 |
|
10 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 11 | +error[E0658]: `transmute` is not allowed in constant functions |
11 | 12 | --> $DIR/feature-gate-const_fn_transmute.rs:11:53 |
12 | 13 | | |
13 | 14 | LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } } |
14 | 15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
15 | 16 | | |
16 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
17 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
18 | 20 |
|
19 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 21 | +error[E0658]: `transmute` is not allowed in constant functions |
20 | 22 | --> $DIR/feature-gate-const_fn_transmute.rs:14:58 |
21 | 23 | | |
22 | 24 | LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } } |
23 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
24 | 26 | | |
25 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
26 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
27 | 30 |
|
28 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 31 | +error[E0658]: `transmute` is not allowed in constant functions |
29 | 32 | --> $DIR/feature-gate-const_fn_transmute.rs:17:48 |
30 | 33 | | |
31 | 34 | LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) } |
32 | 35 | | ^^^^^^^^^^^^^^^^^^^^^^ |
33 | 36 | | |
34 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
35 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
36 | 40 |
|
37 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 41 | +error[E0658]: `transmute` is not allowed in constant functions |
38 | 42 | --> $DIR/feature-gate-const_fn_transmute.rs:20:58 |
39 | 43 | | |
40 | 44 | LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) } |
41 | 45 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
42 | 46 | | |
43 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
44 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
45 | 50 |
|
46 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 51 | +error[E0658]: `transmute` is not allowed in constant functions |
47 | 52 | --> $DIR/feature-gate-const_fn_transmute.rs:23:63 |
48 | 53 | | |
49 | 54 | LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) } |
50 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
51 | 56 | | |
52 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
53 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
54 | 60 |
|
55 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 61 | +error[E0658]: `transmute` is not allowed in constant functions |
56 | 62 | --> $DIR/feature-gate-const_fn_transmute.rs:26:39 |
57 | 63 | | |
58 | 64 | LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) } |
59 | 65 | | ^^^^^^^^^^^^^^^^^^^^^^ |
60 | 66 | | |
61 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
62 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
63 | 70 |
|
64 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 71 | +error[E0658]: `transmute` is not allowed in constant functions |
65 | 72 | --> $DIR/feature-gate-const_fn_transmute.rs:30:49 |
66 | 73 | | |
67 | 74 | LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) } |
68 | 75 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
69 | 76 | | |
70 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
71 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
72 | 80 |
|
73 | | -error[E0723]: can only call `transmute` from const items, not `const fn` |
| 81 | +error[E0658]: `transmute` is not allowed in constant functions |
74 | 82 | --> $DIR/feature-gate-const_fn_transmute.rs:34:54 |
75 | 83 | | |
76 | 84 | LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) } |
77 | 85 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
78 | 86 | | |
79 | | - = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information |
80 | | - = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| 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 |
81 | 90 |
|
82 | 91 | error[E0133]: call to unsafe function is unsafe and requires unsafe function or block |
83 | 92 | --> $DIR/feature-gate-const_fn_transmute.rs:26:39 |
@@ -105,5 +114,5 @@ LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::tran |
105 | 114 |
|
106 | 115 | error: aborting due to 12 previous errors |
107 | 116 |
|
108 | | -Some errors have detailed explanations: E0133, E0723. |
| 117 | +Some errors have detailed explanations: E0133, E0658. |
109 | 118 | For more information about an error, try `rustc --explain E0133`. |
0 commit comments