summaryrefslogtreecommitdiffstats
path: root/src/test/ui/transmutability/malformed-program-gracefulness/unknown_dst.rs
blob: b3a1e13b85bed0595c5bfa4d43e2c1e86de9c070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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
}