1
1
error[E0658]: `transmute` is not allowed in constant functions
2
- --> $DIR/feature-gate-const_fn_transmute.rs:8 :43
2
+ --> $DIR/feature-gate-const_fn_transmute.rs:11 :43
3
3
|
4
4
LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } }
5
5
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } }
9
9
= note: `transmute` is only allowed in constants and statics for now
10
10
11
11
error[E0658]: `transmute` is not allowed in constant functions
12
- --> $DIR/feature-gate-const_fn_transmute.rs:11 :53
12
+ --> $DIR/feature-gate-const_fn_transmute.rs:14 :53
13
13
|
14
14
LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } }
15
15
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transm
19
19
= note: `transmute` is only allowed in constants and statics for now
20
20
21
21
error[E0658]: `transmute` is not allowed in constant functions
22
- --> $DIR/feature-gate-const_fn_transmute.rs:14 :58
22
+ --> $DIR/feature-gate-const_fn_transmute.rs:17 :58
23
23
|
24
24
LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } }
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::
29
29
= note: `transmute` is only allowed in constants and statics for now
30
30
31
31
error[E0658]: `transmute` is not allowed in constant functions
32
- --> $DIR/feature-gate-const_fn_transmute.rs:17 :48
32
+ --> $DIR/feature-gate-const_fn_transmute.rs:20 :48
33
33
|
34
34
LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
35
35
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
39
39
= note: `transmute` is only allowed in constants and statics for now
40
40
41
41
error[E0658]: `transmute` is not allowed in constant functions
42
- --> $DIR/feature-gate-const_fn_transmute.rs:20 :58
42
+ --> $DIR/feature-gate-const_fn_transmute.rs:23 :58
43
43
|
44
44
LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
45
45
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::t
49
49
= note: `transmute` is only allowed in constants and statics for now
50
50
51
51
error[E0658]: `transmute` is not allowed in constant functions
52
- --> $DIR/feature-gate-const_fn_transmute.rs:23 :63
52
+ --> $DIR/feature-gate-const_fn_transmute.rs:26 :63
53
53
|
54
54
LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
55
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrins
59
59
= note: `transmute` is only allowed in constants and statics for now
60
60
61
61
error[E0658]: `transmute` is not allowed in constant functions
62
- --> $DIR/feature-gate-const_fn_transmute.rs:26 :39
62
+ --> $DIR/feature-gate-const_fn_transmute.rs:29 :39
63
63
|
64
64
LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
65
65
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -69,7 +69,7 @@ LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
69
69
= note: `transmute` is only allowed in constants and statics for now
70
70
71
71
error[E0658]: `transmute` is not allowed in constant functions
72
- --> $DIR/feature-gate-const_fn_transmute.rs:30 :49
72
+ --> $DIR/feature-gate-const_fn_transmute.rs:33 :49
73
73
|
74
74
LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
75
75
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -79,7 +79,7 @@ LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(
79
79
= note: `transmute` is only allowed in constants and statics for now
80
80
81
81
error[E0658]: `transmute` is not allowed in constant functions
82
- --> $DIR/feature-gate-const_fn_transmute.rs:34 :54
82
+ --> $DIR/feature-gate-const_fn_transmute.rs:37 :54
83
83
|
84
84
LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
85
85
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -89,23 +89,23 @@ LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::tran
89
89
= note: `transmute` is only allowed in constants and statics for now
90
90
91
91
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
92
- --> $DIR/feature-gate-const_fn_transmute.rs:26 :39
92
+ --> $DIR/feature-gate-const_fn_transmute.rs:29 :39
93
93
|
94
94
LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
95
95
| ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
96
96
|
97
97
= note: consult the function's documentation for information on how to avoid undefined behavior
98
98
99
99
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
100
- --> $DIR/feature-gate-const_fn_transmute.rs:30 :49
100
+ --> $DIR/feature-gate-const_fn_transmute.rs:33 :49
101
101
|
102
102
LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
103
103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
104
104
|
105
105
= note: consult the function's documentation for information on how to avoid undefined behavior
106
106
107
107
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
108
- --> $DIR/feature-gate-const_fn_transmute.rs:34 :54
108
+ --> $DIR/feature-gate-const_fn_transmute.rs:37 :54
109
109
|
110
110
LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
111
111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
0 commit comments