safe transmute: Rename BikeshedIntrinsicFrom to TransmuteFrom

As our implementation of MCP411 nears completion and we begin to
solicit testing, it's no longer reasonable to expect testers to
type or remember `BikeshedIntrinsicFrom`. The name degrades the
ease-of-reading of documentation, and the overall experience of
using compiler safe transmute.

Tentatively, we'll instead adopt `TransmuteFrom`.

This name seems to be the one most likely to be stabilized, after
discussion on Zulip [1]. We may want to revisit the ordering of
`Src` and `Dst` before stabilization, at which point we'd likely
consider `TransmuteInto` or `Transmute`.

[1] https://rust-lang.zulipchat.com/#narrow/stream/216762-project-safe-transmute/topic/What.20should.20.60BikeshedIntrinsicFrom.60.20be.20named.3F
This commit is contained in:
Jack Wrenn 2024-08-27 14:05:54 +00:00
parent ae9f5019f9
commit 1ad218f3af
112 changed files with 528 additions and 531 deletions

View File

@ -862,7 +862,7 @@ fn consider_builtin_transmute_candidate(
_ecx: &mut EvalCtxt<'_, D>,
goal: Goal<I, Self>,
) -> Result<Candidate<I>, NoSolution> {
panic!("`BikeshedIntrinsicFrom` does not have an associated type: {:?}", goal)
panic!("`TransmuteFrom` does not have an associated type: {:?}", goal)
}
fn consider_builtin_effects_intersection_candidate(

View File

@ -19,7 +19,7 @@
mod transmutability;
#[unstable(feature = "transmutability", issue = "99571")]
pub use transmutability::{Assume, BikeshedIntrinsicFrom};
pub use transmutability::{Assume, TransmuteFrom};
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(inline)]

View File

@ -11,10 +11,10 @@
///
/// # Safety
///
/// If `Dst: BikeshedIntrinsicFrom<Src, ASSUMPTIONS>`, the compiler guarantees
/// that `Src` is soundly *union-transmutable* into a value of type `Dst`,
/// provided that the programmer has guaranteed that the given
/// [`ASSUMPTIONS`](Assume) are satisfied.
/// If `Dst: TransmuteFrom<Src, ASSUMPTIONS>`, the compiler guarantees that
/// `Src` is soundly *union-transmutable* into a value of type `Dst`, provided
/// that the programmer has guaranteed that the given [`ASSUMPTIONS`](Assume)
/// are satisfied.
///
/// A union-transmute is any bit-reinterpretation conversion in the form of:
///
@ -47,7 +47,7 @@
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// #![feature(transmutability)]
///
/// use core::mem::{Assume, BikeshedIntrinsicFrom};
/// use core::mem::{Assume, TransmuteFrom};
///
/// let src = 42u8; // size = 1
///
@ -55,7 +55,7 @@
/// struct Dst(u8); // size = 2
//
/// let _ = unsafe {
/// <Dst as BikeshedIntrinsicFrom<u8, { Assume::SAFETY }>>::transmute(src)
/// <Dst as TransmuteFrom<u8, { Assume::SAFETY }>>::transmute(src)
/// };
/// ```
///
@ -87,7 +87,7 @@
#[lang = "transmute_trait"]
#[rustc_deny_explicit_impl(implement_via_object = false)]
#[rustc_coinductive]
pub unsafe trait BikeshedIntrinsicFrom<Src, const ASSUME: Assume = { Assume::NOTHING }>
pub unsafe trait TransmuteFrom<Src, const ASSUME: Assume = { Assume::NOTHING }>
where
Src: ?Sized,
{
@ -140,23 +140,21 @@ union Transmute<Src, Dst> {
}
}
/// Configurable proof assumptions of [`BikeshedIntrinsicFrom`].
/// Configurable proof assumptions of [`TransmuteFrom`].
///
/// When `false`, the respective proof obligation belongs to the compiler. When
/// `true`, the onus of the safety proof belongs to the programmer.
/// [`BikeshedIntrinsicFrom`].
#[unstable(feature = "transmutability", issue = "99571")]
#[lang = "transmute_opts"]
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct Assume {
/// When `false`, [`BikeshedIntrinsicFrom`] is not implemented for
/// transmutations that might violate the the alignment requirements of
/// references; e.g.:
/// When `false`, [`TransmuteFrom`] is not implemented for transmutations
/// that might violate the the alignment requirements of references; e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```compile_fail,E0277")]
/// #![feature(transmutability)]
/// use core::mem::{align_of, BikeshedIntrinsicFrom};
/// use core::mem::{align_of, TransmuteFrom};
///
/// assert_eq!(align_of::<[u8; 2]>(), 1);
/// assert_eq!(align_of::<u16>(), 2);
@ -165,18 +163,18 @@ pub struct Assume {
///
/// // SAFETY: No safety obligations.
/// let dst: &u16 = unsafe {
/// <_ as BikeshedIntrinsicFrom<_>>::transmute(src)
/// <_ as TransmuteFrom<_>>::transmute(src)
/// };
/// ```
///
/// When `true`, [`BikeshedIntrinsicFrom`] assumes that *you* have ensured
/// When `true`, [`TransmuteFrom`] assumes that *you* have ensured
/// that references in the transmuted value satisfy the alignment
/// requirements of their referent types; e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// #![feature(pointer_is_aligned_to, transmutability)]
/// use core::mem::{align_of, Assume, BikeshedIntrinsicFrom};
/// use core::mem::{align_of, Assume, TransmuteFrom};
///
/// let src: &[u8; 2] = &[0xFF, 0xFF];
///
@ -184,7 +182,7 @@ pub struct Assume {
/// // SAFETY: We have checked above that the address of `src` satisfies the
/// // alignment requirements of `u16`.
/// Some(unsafe {
/// <_ as BikeshedIntrinsicFrom<_, { Assume::ALIGNMENT }>>::transmute(src)
/// <_ as TransmuteFrom<_, { Assume::ALIGNMENT }>>::transmute(src)
/// })
/// } else {
/// None
@ -194,21 +192,21 @@ pub struct Assume {
/// ```
pub alignment: bool,
/// When `false`, [`BikeshedIntrinsicFrom`] is not implemented for
/// transmutations that extend the lifetimes of references.
/// When `false`, [`TransmuteFrom`] is not implemented for transmutations
/// that extend the lifetimes of references.
///
/// When `true`, [`BikeshedIntrinsicFrom`] assumes that *you* have ensured
/// that references in the transmuted value do not outlive their referents.
/// When `true`, [`TransmuteFrom`] assumes that *you* have ensured that
/// references in the transmuted value do not outlive their referents.
pub lifetimes: bool,
/// When `false`, [`BikeshedIntrinsicFrom`] is not implemented for
/// transmutations that might violate the library safety invariants of the
/// destination type; e.g.:
/// When `false`, [`TransmuteFrom`] is not implemented for transmutations
/// that might violate the library safety invariants of the destination
/// type; e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```compile_fail,E0277")]
/// #![feature(transmutability)]
/// use core::mem::BikeshedIntrinsicFrom;
/// use core::mem::TransmuteFrom;
///
/// let src: u8 = 3;
///
@ -219,18 +217,18 @@ pub struct Assume {
///
/// // SAFETY: No safety obligations.
/// let dst: EvenU8 = unsafe {
/// <_ as BikeshedIntrinsicFrom<_>>::transmute(src)
/// <_ as TransmuteFrom<_>>::transmute(src)
/// };
/// ```
///
/// When `true`, [`BikeshedIntrinsicFrom`] assumes that *you* have ensured
/// When `true`, [`TransmuteFrom`] assumes that *you* have ensured
/// that undefined behavior does not arise from using the transmuted value;
/// e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// #![feature(transmutability)]
/// use core::mem::{Assume, BikeshedIntrinsicFrom};
/// use core::mem::{Assume, TransmuteFrom};
///
/// let src: u8 = 42;
///
@ -242,7 +240,7 @@ pub struct Assume {
/// let maybe_dst: Option<EvenU8> = if src % 2 == 0 {
/// // SAFETY: We have checked above that the value of `src` is even.
/// Some(unsafe {
/// <_ as BikeshedIntrinsicFrom<_, { Assume::SAFETY }>>::transmute(src)
/// <_ as TransmuteFrom<_, { Assume::SAFETY }>>::transmute(src)
/// })
/// } else {
/// None
@ -252,31 +250,31 @@ pub struct Assume {
/// ```
pub safety: bool,
/// When `false`, [`BikeshedIntrinsicFrom`] is not implemented for
/// transmutations that might violate the language-level bit-validity
/// invariant of the destination type; e.g.:
/// When `false`, [`TransmuteFrom`] is not implemented for transmutations
/// that might violate the language-level bit-validity invariant of the
/// destination type; e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```compile_fail,E0277")]
/// #![feature(transmutability)]
/// use core::mem::BikeshedIntrinsicFrom;
/// use core::mem::TransmuteFrom;
///
/// let src: u8 = 3;
///
/// // SAFETY: No safety obligations.
/// let dst: bool = unsafe {
/// <_ as BikeshedIntrinsicFrom<_>>::transmute(src)
/// <_ as TransmuteFrom<_>>::transmute(src)
/// };
/// ```
///
/// When `true`, [`BikeshedIntrinsicFrom`] assumes that *you* have ensured
/// When `true`, [`TransmuteFrom`] assumes that *you* have ensured
/// that the value being transmuted is a bit-valid instance of the
/// transmuted value; e.g.:
///
#[cfg_attr(bootstrap, doc = "```rust,ignore not runnable on bootstrap")]
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// #![feature(transmutability)]
/// use core::mem::{Assume, BikeshedIntrinsicFrom};
/// use core::mem::{Assume, TransmuteFrom};
///
/// let src: u8 = 1;
///
@ -284,7 +282,7 @@ pub struct Assume {
/// // SAFETY: We have checked above that the value of `src` is a bit-valid
/// // instance of `bool`.
/// Some(unsafe {
/// <_ as BikeshedIntrinsicFrom<_, { Assume::VALIDITY }>>::transmute(src)
/// <_ as TransmuteFrom<_, { Assume::VALIDITY }>>::transmute(src)
/// })
/// } else {
/// None
@ -301,35 +299,34 @@ impl ConstParamTy_ for Assume {}
impl UnsizedConstParamTy for Assume {}
impl Assume {
/// With this, [`BikeshedIntrinsicFrom`] does not assume you have ensured
/// any safety obligations are met, and relies only upon its own analysis to
/// (dis)prove transmutability.
/// With this, [`TransmuteFrom`] does not assume you have ensured any safety
/// obligations are met, and relies only upon its own analysis to (dis)prove
/// transmutability.
#[unstable(feature = "transmutability", issue = "99571")]
pub const NOTHING: Self =
Self { alignment: false, lifetimes: false, safety: false, validity: false };
/// With this, [`BikeshedIntrinsicFrom`] assumes only that you have ensured
/// that references in the transmuted value satisfy the alignment
/// requirements of their referent types. See [`Assume::alignment`] for
/// examples.
/// With this, [`TransmuteFrom`] assumes only that you have ensured that
/// references in the transmuted value satisfy the alignment requirements of
/// their referent types. See [`Assume::alignment`] for examples.
#[unstable(feature = "transmutability", issue = "99571")]
pub const ALIGNMENT: Self = Self { alignment: true, ..Self::NOTHING };
/// With this, [`BikeshedIntrinsicFrom`] assumes only that you have ensured
/// that references in the transmuted value do not outlive their referents.
/// See [`Assume::lifetimes`] for examples.
/// With this, [`TransmuteFrom`] assumes only that you have ensured that
/// references in the transmuted value do not outlive their referents. See
/// [`Assume::lifetimes`] for examples.
#[unstable(feature = "transmutability", issue = "99571")]
pub const LIFETIMES: Self = Self { lifetimes: true, ..Self::NOTHING };
/// With this, [`BikeshedIntrinsicFrom`] assumes only that you have ensured
/// that undefined behavior does not arise from using the transmuted value.
/// See [`Assume::safety`] for examples.
/// With this, [`TransmuteFrom`] assumes only that you have ensured that
/// undefined behavior does not arise from using the transmuted value. See
/// [`Assume::safety`] for examples.
#[unstable(feature = "transmutability", issue = "99571")]
pub const SAFETY: Self = Self { safety: true, ..Self::NOTHING };
/// With this, [`BikeshedIntrinsicFrom`] assumes only that you have ensured
/// that the value being transmuted is a bit-valid instance of the
/// transmuted value. See [`Assume::validity`] for examples.
/// With this, [`TransmuteFrom`] assumes only that you have ensured that the
/// value being transmuted is a bit-valid instance of the transmuted value.
/// See [`Assume::validity`] for examples.
#[unstable(feature = "transmutability", issue = "99571")]
pub const VALIDITY: Self = Self { validity: true, ..Self::NOTHING };
@ -348,7 +345,7 @@ impl Assume {
/// transmutability,
/// )]
/// #![allow(incomplete_features)]
/// use core::mem::{align_of, Assume, BikeshedIntrinsicFrom};
/// use core::mem::{align_of, Assume, TransmuteFrom};
///
/// /// Attempts to transmute `src` to `&Dst`.
/// ///
@ -360,7 +357,7 @@ impl Assume {
/// /// alignment, are satisfied.
/// unsafe fn try_transmute_ref<'a, Src, Dst, const ASSUME: Assume>(src: &'a Src) -> Option<&'a Dst>
/// where
/// &'a Dst: BikeshedIntrinsicFrom<&'a Src, { ASSUME.and(Assume::ALIGNMENT) }>,
/// &'a Dst: TransmuteFrom<&'a Src, { ASSUME.and(Assume::ALIGNMENT) }>,
/// {
/// if <*const _>::is_aligned_to(src, align_of::<Dst>()) {
/// // SAFETY: By the above dynamic check, we have ensured that the address
@ -368,7 +365,7 @@ impl Assume {
/// // on the caller, the safety obligations required by `ASSUME` have also
/// // been satisfied.
/// Some(unsafe {
/// <_ as BikeshedIntrinsicFrom<_, { ASSUME.and(Assume::ALIGNMENT) }>>::transmute(src)
/// <_ as TransmuteFrom<_, { ASSUME.and(Assume::ALIGNMENT) }>>::transmute(src)
/// })
/// } else {
/// None

View File

@ -3,11 +3,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::NOTHING }>,
Dst: TransmuteFrom<Src, { Assume::NOTHING }>,
{
}
}

View File

@ -4,6 +4,6 @@
trait OpaqueTrait {}
type OpaqueType = impl OpaqueTrait;
trait AnotherTrait {}
impl<T: std::mem::BikeshedIntrinsicFrom<(), ()>> AnotherTrait for T {}
impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
impl AnotherTrait for OpaqueType {}
pub fn main() {}

View File

@ -3,6 +3,6 @@
#![feature(transmutability)]
#![feature(unboxed_closures,effects)]
const fn test() -> impl std::mem::BikeshedIntrinsicFrom() {
const fn test() -> impl std::mem::TransmuteFrom() {
|| {}
}

View File

@ -14,11 +14,11 @@ pub enum Error {
}
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>, // safety is NOT assumed
Dst: TransmuteFrom<Src>, // safety is NOT assumed
{
}
}

View File

@ -4,7 +4,7 @@
#![feature(generic_const_exprs)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<
Src,
@ -15,7 +15,7 @@ pub fn is_transmutable<
const ASSUME_VALIDITY: bool,
>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{ }
>,

View File

@ -1,10 +1,10 @@
//@ known-bug: rust-lang/rust#126966
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>,
Dst: TransmuteFrom<Src>,
{
}
}

View File

@ -4,11 +4,11 @@
#![allow(incomplete_features, unstable_features)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst, Context, const ASSUME: std::mem::Assume>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
Dst: TransmuteFrom<Src, Context, ASSUME>,
//~^ ERROR trait takes at most 2 generic arguments but 3 generic arguments were supplied
{
}

View File

@ -1,8 +1,8 @@
error[E0107]: trait takes at most 2 generic arguments but 3 generic arguments were supplied
--> $DIR/transmutable-ice-110969.rs:11:14
|
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
| ^^^^^^^^^^^^^^^^^^^^^ -------- help: remove the unnecessary generic argument
LL | Dst: TransmuteFrom<Src, Context, ASSUME>,
| ^^^^^^^^^^^^^ -------- help: remove the unnecessary generic argument
| |
| expected at most 2 generic arguments

View File

@ -8,7 +8,7 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<
Src,
@ -16,7 +16,7 @@ pub fn is_transmutable<
const ASSUME: std::mem::Assume,
>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
ASSUME,
>,

View File

@ -6,12 +6,12 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn array_like<T, E, const N: usize>()
where
T: BikeshedIntrinsicFrom<[E; N], { Assume::SAFETY }>,
[E; N]: BikeshedIntrinsicFrom<T, { Assume::SAFETY }>
T: TransmuteFrom<[E; N], { Assume::SAFETY }>,
[E; N]: TransmuteFrom<T, { Assume::SAFETY }>
{}
}

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: true,

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: false,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: false,

View File

@ -1,11 +1,11 @@
#![crate_type = "lib"]
#![feature(transmutability)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>,
Dst: TransmuteFrom<Src>,
{
}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
LL | Dst: TransmuteFrom<Src>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
error[E0277]: `ExplicitlyPadded` cannot be safely transmuted into `()`
--> $DIR/huge-len.rs:24:55
@ -25,8 +25,8 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
LL | Dst: TransmuteFrom<Src>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
error: aborting due to 2 previous errors

View File

@ -3,11 +3,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{ Assume { alignment: true, lifetimes: true, safety: true, validity: true } },
>,

View File

@ -6,11 +6,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY.and(Assume::VALIDITY) }>
Dst: TransmuteFrom<Src, { Assume::SAFETY.and(Assume::VALIDITY) }>
{}
}

View File

@ -6,11 +6,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)
@ -31,7 +31,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)
@ -52,7 +52,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)
@ -73,7 +73,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)
@ -94,7 +94,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)
@ -115,7 +115,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: false,
@ -21,7 +21,7 @@ pub fn is_transmutable<Src, Dst>()
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: false,

View File

@ -7,11 +7,11 @@
use std::mem::MaybeUninit;
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: false,
@ -23,7 +23,7 @@ pub fn is_transmutable<Src, Dst>()
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: false,

View File

@ -5,11 +5,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -32,7 +32,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -54,7 +54,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -76,7 +76,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -98,7 +98,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -120,7 +120,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -142,7 +142,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -164,7 +164,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -186,7 +186,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -208,7 +208,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -230,7 +230,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -252,7 +252,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -274,7 +274,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -296,7 +296,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -318,7 +318,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -340,7 +340,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -362,7 +362,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -384,7 +384,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -406,7 +406,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -428,7 +428,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)

View File

@ -4,7 +4,7 @@
fn assert_transmutable<T>()
where
(): std::mem::BikeshedIntrinsicFrom<T>
(): std::mem::TransmuteFrom<T>
{}
enum Uninhabited {}

View File

@ -1,11 +1,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, const ASSUME_ALIGNMENT: bool>()
where
Dst: BikeshedIntrinsicFrom<Src, ASSUME_ALIGNMENT>, //~ ERROR cannot find type `Dst` in this scope
Dst: TransmuteFrom<Src, ASSUME_ALIGNMENT>, //~ ERROR cannot find type `Dst` in this scope
//~| the constant `ASSUME_ALIGNMENT` is not of type `Assume`
//~| ERROR: mismatched types
{

View File

@ -1,23 +1,23 @@
error[E0412]: cannot find type `Dst` in this scope
--> $DIR/issue-101739-1.rs:8:9
|
LL | Dst: BikeshedIntrinsicFrom<Src, ASSUME_ALIGNMENT>,
LL | Dst: TransmuteFrom<Src, ASSUME_ALIGNMENT>,
| ^^^ not found in this scope
error: the constant `ASSUME_ALIGNMENT` is not of type `Assume`
--> $DIR/issue-101739-1.rs:8:14
|
LL | Dst: BikeshedIntrinsicFrom<Src, ASSUME_ALIGNMENT>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Assume`, found `bool`
LL | Dst: TransmuteFrom<Src, ASSUME_ALIGNMENT>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Assume`, found `bool`
|
note: required by a const generic parameter in `BikeshedIntrinsicFrom`
note: required by a const generic parameter in `TransmuteFrom`
--> $SRC_DIR/core/src/mem/transmutability.rs:LL:COL
error[E0308]: mismatched types
--> $DIR/issue-101739-1.rs:8:41
--> $DIR/issue-101739-1.rs:8:33
|
LL | Dst: BikeshedIntrinsicFrom<Src, ASSUME_ALIGNMENT>,
| ^^^^^^^^^^^^^^^^ expected `Assume`, found `bool`
LL | Dst: TransmuteFrom<Src, ASSUME_ALIGNMENT>,
| ^^^^^^^^^^^^^^^^ expected `Assume`, found `bool`
error: aborting due to 3 previous errors

View File

@ -3,7 +3,7 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<
Src,
@ -14,7 +14,7 @@ pub fn is_transmutable<
const ASSUME_VISIBILITY: bool,
>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
//~^ ERROR trait takes at most 2 generic arguments but 5 generic arguments were supplied
Src,
ASSUME_ALIGNMENT, //~ ERROR: mismatched types

View File

@ -1,8 +1,8 @@
error[E0107]: trait takes at most 2 generic arguments but 5 generic arguments were supplied
--> $DIR/issue-101739-2.rs:17:14
|
LL | Dst: BikeshedIntrinsicFrom<
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
LL | Dst: TransmuteFrom<
| ^^^^^^^^^^^^^ expected at most 2 generic arguments
...
LL | ASSUME_ALIGNMENT,
| _________________________________-

View File

@ -1,11 +1,11 @@
//@ check-pass
#![crate_type = "lib"]
#![feature(transmutability)]
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>,
Dst: TransmuteFrom<Src>,
{
}

View File

@ -3,7 +3,7 @@
#![allow(incomplete_features)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<
Src,
@ -14,7 +14,7 @@ pub fn is_transmutable<
const ASSUME_VALIDITY: bool,
>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{ from_options(ASSUME_ALIGNMENT, ASSUME_LIFETIMES, ASSUME_SAFETY, ASSUME_VALIDITY) }
>,

View File

@ -2,7 +2,7 @@
#![crate_type = "lib"]
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
//~^ ERROR use of unstable library feature 'transmutability' [E0658]
use std::mem::Assume;

View File

@ -1,8 +1,8 @@
error[E0658]: use of unstable library feature 'transmutability'
--> $DIR/feature-missing.rs:5:5
|
LL | use std::mem::BikeshedIntrinsicFrom;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | use std::mem::TransmuteFrom;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #99571 <https://github.com/rust-lang/rust/issues/99571> for more information
= help: add `#![feature(transmutability)]` to the crate attributes to enable

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>
Dst: TransmuteFrom<Src>
{}
}

View File

@ -5,11 +5,11 @@
#![allow(incomplete_features)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>
Dst: TransmuteFrom<Src>
{}
}

View File

@ -22,8 +22,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `should_gracefully_handle_unknown_dst_ref_field::Src` cannot be safely transmuted into `should_gracefully_handle_unknown_dst_ref_field::Dst`
--> $DIR/unknown_dst_field.rs:25:36
@ -37,8 +37,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 4 previous errors

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>
Dst: TransmuteFrom<Src>
{}
}

View File

@ -5,11 +5,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>
Dst: TransmuteFrom<Src>
{}
}

View File

@ -22,8 +22,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `should_gracefully_handle_unknown_src_ref_field::Src` cannot be safely transmuted into `should_gracefully_handle_unknown_src_ref_field::Dst`
--> $DIR/unknown_src_field.rs:25:36
@ -37,8 +37,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 4 previous errors

View File

@ -8,7 +8,7 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<
Src,
@ -19,7 +19,7 @@ pub fn is_transmutable<
const ASSUME_VALIDITY: bool,
>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{ from_options(ASSUME_ALIGNMENT, ASSUME_LIFETIMES, ASSUME_SAFETY, ASSUME_VALIDITY) }
>,

View File

@ -5,11 +5,11 @@
use std::mem::MaybeUninit;
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
error: aborting due to 1 previous error

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 1 previous error

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 1 previous error

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 1 previous error

View File

@ -4,16 +4,16 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY.and(Assume::VALIDITY) }>
Dst: TransmuteFrom<Src, { Assume::SAFETY.and(Assume::VALIDITY) }>
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u16`
--> $DIR/numbers.rs:65:40
@ -25,8 +25,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:66:40
@ -40,8 +40,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:67:40
@ -55,8 +55,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:68:40
@ -70,8 +70,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:69:40
@ -85,8 +85,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:70:40
@ -100,8 +100,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:71:40
@ -115,8 +115,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:72:39
@ -130,8 +130,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:73:39
@ -145,8 +145,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i16`
--> $DIR/numbers.rs:75:40
@ -160,8 +160,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u16`
--> $DIR/numbers.rs:76:40
@ -175,8 +175,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:77:40
@ -190,8 +190,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:78:40
@ -205,8 +205,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:79:40
@ -220,8 +220,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:80:40
@ -235,8 +235,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:81:40
@ -250,8 +250,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:82:40
@ -265,8 +265,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:83:39
@ -280,8 +280,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:84:39
@ -295,8 +295,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:86:40
@ -310,8 +310,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:87:40
@ -325,8 +325,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:88:40
@ -340,8 +340,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:89:40
@ -355,8 +355,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:90:40
@ -370,8 +370,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:91:40
@ -385,8 +385,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:92:39
@ -400,8 +400,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:93:39
@ -415,8 +415,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:95:40
@ -430,8 +430,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:96:40
@ -445,8 +445,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:97:40
@ -460,8 +460,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:98:40
@ -475,8 +475,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:99:40
@ -490,8 +490,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:100:40
@ -505,8 +505,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:101:39
@ -520,8 +520,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:102:39
@ -535,8 +535,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:104:40
@ -550,8 +550,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:105:40
@ -565,8 +565,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:106:40
@ -580,8 +580,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:107:39
@ -595,8 +595,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:108:39
@ -610,8 +610,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:110:40
@ -625,8 +625,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:111:40
@ -640,8 +640,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:112:40
@ -655,8 +655,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:113:39
@ -670,8 +670,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:114:39
@ -685,8 +685,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:116:40
@ -700,8 +700,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:117:40
@ -715,8 +715,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:118:40
@ -730,8 +730,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:119:39
@ -745,8 +745,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:120:39
@ -760,8 +760,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:122:39
@ -775,8 +775,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:123:39
@ -790,8 +790,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:125:39
@ -805,8 +805,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:126:39
@ -820,8 +820,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:128:39
@ -835,8 +835,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:129:39
@ -850,8 +850,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 57 previous errors

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u16`
--> $DIR/numbers.rs:65:40
@ -25,8 +25,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:66:40
@ -40,8 +40,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:67:40
@ -55,8 +55,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:68:40
@ -70,8 +70,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:69:40
@ -85,8 +85,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:70:40
@ -100,8 +100,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:71:40
@ -115,8 +115,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:72:39
@ -130,8 +130,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i8` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:73:39
@ -145,8 +145,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i16`
--> $DIR/numbers.rs:75:40
@ -160,8 +160,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u16`
--> $DIR/numbers.rs:76:40
@ -175,8 +175,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:77:40
@ -190,8 +190,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:78:40
@ -205,8 +205,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:79:40
@ -220,8 +220,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:80:40
@ -235,8 +235,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:81:40
@ -250,8 +250,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:82:40
@ -265,8 +265,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:83:39
@ -280,8 +280,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u8` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:84:39
@ -295,8 +295,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:86:40
@ -310,8 +310,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:87:40
@ -325,8 +325,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:88:40
@ -340,8 +340,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:89:40
@ -355,8 +355,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:90:40
@ -370,8 +370,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:91:40
@ -385,8 +385,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:92:39
@ -400,8 +400,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i16` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:93:39
@ -415,8 +415,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i32`
--> $DIR/numbers.rs:95:40
@ -430,8 +430,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `f32`
--> $DIR/numbers.rs:96:40
@ -445,8 +445,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u32`
--> $DIR/numbers.rs:97:40
@ -460,8 +460,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:98:40
@ -475,8 +475,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:99:40
@ -490,8 +490,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:100:40
@ -505,8 +505,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:101:39
@ -520,8 +520,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u16` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:102:39
@ -535,8 +535,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:104:40
@ -550,8 +550,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:105:40
@ -565,8 +565,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:106:40
@ -580,8 +580,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:107:39
@ -595,8 +595,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:108:39
@ -610,8 +610,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:110:40
@ -625,8 +625,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:111:40
@ -640,8 +640,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:112:40
@ -655,8 +655,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:113:39
@ -670,8 +670,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:114:39
@ -685,8 +685,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `u64`
--> $DIR/numbers.rs:116:40
@ -700,8 +700,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `i64`
--> $DIR/numbers.rs:117:40
@ -715,8 +715,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `f64`
--> $DIR/numbers.rs:118:40
@ -730,8 +730,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:119:39
@ -745,8 +745,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u32` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:120:39
@ -760,8 +760,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:122:39
@ -775,8 +775,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `u64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:123:39
@ -790,8 +790,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:125:39
@ -805,8 +805,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `i64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:126:39
@ -820,8 +820,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f64` cannot be safely transmuted into `u128`
--> $DIR/numbers.rs:128:39
@ -835,8 +835,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error[E0277]: `f64` cannot be safely transmuted into `i128`
--> $DIR/numbers.rs:129:39
@ -850,8 +850,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src>
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 57 previous errors

View File

@ -7,11 +7,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>
Dst: TransmuteFrom<Src>
{}
}

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume::ALIGNMENT
LL | | .and(Assume::LIFETIMES)

View File

@ -9,11 +9,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -4,11 +4,11 @@
#![feature(transmutability, core_intrinsics)]
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
unsafe fn transmute<Src, Dst>(src: Src) -> Dst
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY.and(Assume::LIFETIMES) }>,
Dst: TransmuteFrom<Src, { Assume::SAFETY.and(Assume::LIFETIMES) }>,
{
core::intrinsics::transmute_unchecked(src)
}
@ -82,7 +82,7 @@ fn call_extend_hrtb<'a>(src: &'a u8) -> &'static u8 {
unsafe fn extend_hrtb<'a>(src: &'a u8) -> &'static u8
where
for<'b> &'b u8: BikeshedIntrinsicFrom<&'a u8, { Assume::LIFETIMES }>,
for<'b> &'b u8: TransmuteFrom<&'a u8, { Assume::LIFETIMES }>,
{
core::intrinsics::transmute_unchecked(src)
}

View File

@ -4,11 +4,11 @@
#![feature(transmutability, core_intrinsics)]
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
unsafe fn transmute<Src, Dst>(src: Src) -> Dst
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>,
Dst: TransmuteFrom<Src, { Assume::SAFETY }>,
{
core::intrinsics::transmute_unchecked(src)
}

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: false,

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: false,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: false,

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: false,

View File

@ -6,11 +6,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{
Assume {

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<
LL | Dst: TransmuteFrom<
| ______________^
LL | | Src,
LL | | {

View File

@ -4,11 +4,11 @@
#![feature(transmutability, core_intrinsics)]
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
unsafe fn transmute<Src, Dst>(src: Src) -> Dst
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>,
Dst: TransmuteFrom<Src, { Assume::SAFETY }>,
{
core::intrinsics::transmute_unchecked(src)
}
@ -82,7 +82,7 @@ fn call_extend_hrtb<'a>(src: &'a u8) -> &'static u8 {
unsafe fn extend_hrtb<'a>(src: &'a u8) -> &'static u8
where
for<'b> &'b u8: BikeshedIntrinsicFrom<&'a u8>,
for<'b> &'b u8: TransmuteFrom<&'a u8>,
{
core::intrinsics::transmute_unchecked(src)
}

View File

@ -70,8 +70,8 @@ LL | unsafe { extend_hrtb(src) }
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
--> $DIR/reject_lifetime_extension.rs:85:25
|
LL | for<'b> &'b u8: BikeshedIntrinsicFrom<&'a u8>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | for<'b> &'b u8: TransmuteFrom<&'a u8>,
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 8 previous errors

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: true,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: false,

View File

@ -2,11 +2,11 @@
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -10,7 +10,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,

View File

@ -5,11 +5,11 @@
use std::cell::UnsafeCell;
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
error[E0277]: `&UnsafeCell<u8>` cannot be safely transmuted into `&UnsafeCell<u8>`
--> $DIR/unsafecell.rs:29:62
@ -25,8 +25,8 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
LL | Dst: TransmuteFrom<Src, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
error: aborting due to 2 previous errors

View File

@ -1,13 +1,13 @@
#![feature(transmutability)]
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
#[repr(C)]
struct W<'a>(&'a ());
fn test<'a>()
where
W<'a>: BikeshedIntrinsicFrom<
W<'a>: TransmuteFrom<
(),
{ Assume { alignment: true, lifetimes: true, safety: true, validity: true } },
>,

View File

@ -10,7 +10,7 @@ note: required by a bound in `test`
LL | fn test<'a>()
| ---- required by a bound in this function
LL | where
LL | W<'a>: BikeshedIntrinsicFrom<
LL | W<'a>: TransmuteFrom<
| ____________^
LL | | (),
LL | | { Assume { alignment: true, lifetimes: true, safety: true, validity: true } },

View File

@ -8,11 +8,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -8,11 +8,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -8,11 +8,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

View File

@ -8,11 +8,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src> // safety is NOT assumed
Dst: TransmuteFrom<Src> // safety is NOT assumed
{}
}

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src> // safety is NOT assumed
Dst: TransmuteFrom<Src> // safety is NOT assumed
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 1 previous error

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src> // safety is NOT assumed
Dst: TransmuteFrom<Src> // safety is NOT assumed
{}
}

View File

@ -10,8 +10,8 @@ note: required by a bound in `is_transmutable`
LL | pub fn is_transmutable<Src, Dst>()
| --------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
LL | Dst: TransmuteFrom<Src> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
error: aborting due to 1 previous error

View File

@ -6,11 +6,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -6,11 +6,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -6,11 +6,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -7,11 +7,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>,
Dst: TransmuteFrom<Src>,
{
}
}

View File

@ -12,7 +12,7 @@ LL | struct ExplicitlyPadded(Box<ExplicitlyPadded>);
error[E0391]: cycle detected when computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded`
|
= note: ...which immediately requires computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded` again
= note: cycle used when evaluating trait selection obligation `(): core::mem::transmutability::BikeshedIntrinsicFrom<should_pad_explicitly_packed_field::ExplicitlyPadded, core::mem::transmutability::Assume { alignment: false, lifetimes: false, safety: false, validity: false }>`
= note: cycle used when evaluating trait selection obligation `(): core::mem::transmutability::TransmuteFrom<should_pad_explicitly_packed_field::ExplicitlyPadded, core::mem::transmutability::Assume { alignment: false, lifetimes: false, safety: false, validity: false }>`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error: aborting due to 2 previous errors

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume::ALIGNMENT
.and(Assume::LIFETIMES)
.and(Assume::SAFETY)

View File

@ -9,11 +9,11 @@
use std::mem::size_of;
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<
Dst: TransmuteFrom<
Src,
{ Assume { alignment: true, lifetimes: true, safety: true, validity: true } },
>,

View File

@ -3,11 +3,11 @@
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, {
Dst: TransmuteFrom<Src, {
Assume {
alignment: true,
lifetimes: true,

View File

@ -34,7 +34,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -56,7 +56,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -78,7 +78,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,
@ -100,7 +100,7 @@ note: required by a bound in `is_maybe_transmutable`
LL | pub fn is_maybe_transmutable<Src, Dst>()
| --------------------- required by a bound in this function
LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, {
LL | Dst: TransmuteFrom<Src, {
| ______________^
LL | | Assume {
LL | | alignment: true,

View File

@ -6,11 +6,11 @@
#![allow(dead_code)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
use std::mem::{Assume, TransmuteFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
}

Some files were not shown because too many files have changed in this diff Show More