Rollup merge of #97269 - RalfJung:transmute, r=m-ou-se
adjust transmute const stabilization version With 1.46, this became callable only in `const`/`static` items. Only since 1.56 is this callable in `const fn`: [changelog](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1560-2021-10-21) Also see [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/transmute.20const.20fn.20stabilization).
This commit is contained in:
commit
b20aff2b33
@ -1144,7 +1144,7 @@ extern "rust-intrinsic" {
|
||||
/// }
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_transmute", since = "1.46.0")]
|
||||
#[rustc_const_stable(feature = "const_transmute", since = "1.56.0")]
|
||||
#[rustc_diagnostic_item = "transmute"]
|
||||
pub fn transmute<T, U>(e: T) -> U;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user