blob: 09f60277688c8f5c89c9f65c094e26a600ccd93f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#![feature(transmutability)]
use std::mem::{Assume, BikeshedIntrinsicFrom};
pub struct Context;
#[repr(C)]
struct W<'a>(&'a ());
fn test<'a>()
where
W<'a>: BikeshedIntrinsicFrom<
(),
Context,
{ Assume { alignment: true, lifetimes: true, safety: true, validity: true } },
>,
{
}
fn main() {
test();
//~^ ERROR `()` cannot be safely transmuted into `W<'_>`
}
|