mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
22 lines
530 B
Rust
22 lines
530 B
Rust
// An unknown destination type should be gracefully handled.
|
|
|
|
#![crate_type = "lib"]
|
|
#![feature(transmutability)]
|
|
#![allow(dead_code, incomplete_features, non_camel_case_types)]
|
|
|
|
mod assert {
|
|
use std::mem::BikeshedIntrinsicFrom;
|
|
pub struct Context;
|
|
|
|
pub fn is_transmutable<Src, Dst, Context>()
|
|
where
|
|
Dst: BikeshedIntrinsicFrom<Src, Context>
|
|
{}
|
|
}
|
|
|
|
fn should_gracefully_handle_unknown_dst() {
|
|
struct Context;
|
|
struct Src;
|
|
assert::is_transmutable::<Src, Dst, Context>(); //~ cannot find type
|
|
}
|