blob: 0aca4acd0a32b8e55cbf47d1fa6c25fcca53dc5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// An unknown source type should be gracefully handled.
#![crate_type = "lib"]
#![feature(transmutability)]
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: TransmuteFrom<Src>
{}
}
fn should_gracefully_handle_unknown_src() {
#[repr(C)] struct Dst;
assert::is_transmutable::<Src, Dst>(); //~ ERROR cannot find type
}
|