blob: 560795a51f58ea645921a89c5b35ce18f6be35fb (
plain)
1
2
3
4
5
6
7
8
9
10
|
struct Const<const P: &'static ()>;
//~^ ERROR `&'static ()` is forbidden as the type of a const generic parameter
fn main() {
const A: &'static () = unsafe {
std::mem::transmute(10 as *const ())
};
let _ = Const::<{A}>;
}
|