rust/tests/ui/transmutability/issue-110467.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
363 B
Rust
Raw Normal View History

//@ check-pass
#![crate_type = "lib"]
#![feature(transmutability)]
use std::mem::BikeshedIntrinsicFrom;
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src>,
{
}
// The `T` here should not have any effect on checking
// if transmutability is allowed or not.
fn function_with_generic<T>() {
is_maybe_transmutable::<(), ()>();
}