]> git.lizzy.rs Git - rust.git/blob - src/test/ui/transmutability/malformed-program-gracefulness/unknown_src.rs
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / ui / transmutability / malformed-program-gracefulness / unknown_src.rs
1 // An unknown source type should be gracefully handled.
2
3 #![crate_type = "lib"]
4 #![feature(transmutability)]
5 #![allow(dead_code, incomplete_features, non_camel_case_types)]
6
7 mod assert {
8     use std::mem::BikeshedIntrinsicFrom;
9     pub struct Context;
10
11     pub fn is_transmutable<Src, Dst, Context>()
12     where
13         Dst: BikeshedIntrinsicFrom<Src, Context>
14     {}
15 }
16
17 fn should_gracefully_handle_unknown_src() {
18     struct Context;
19     #[repr(C)] struct Dst;
20     assert::is_transmutable::<Src, Dst, Context>(); //~ cannot find type
21 }