blob: 3147d61ec9bd9f8c491a3880f6015a4c00585499 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// revisions: full min
//[full] check-pass
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
struct Const<const P: &'static ()>;
//[min]~^ 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}>;
}
|