]> git.lizzy.rs Git - rust.git/blob - src/test/ui/transmutability/issue-101739-1.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / transmutability / issue-101739-1.rs
1 #![feature(transmutability)]
2
3 mod assert {
4     use std::mem::BikeshedIntrinsicFrom;
5
6     pub fn is_transmutable<Src, Context, const ASSUME_ALIGNMENT: bool>()
7     where
8         Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>, //~ ERROR cannot find type `Dst` in this scope
9         //~^ ERROR mismatched types
10     {
11     }
12 }
13
14 fn via_const() {
15     struct Context;
16     struct Src;
17
18     assert::is_transmutable::<Src, Context, false>();
19 }
20
21 fn main() {}