2021-06-10 16:20:54 -05:00
|
|
|
// revisions: full min
|
|
|
|
//[full] check-pass
|
|
|
|
|
2021-08-30 03:59:53 -05:00
|
|
|
#![cfg_attr(full, feature(adt_const_params))]
|
2021-06-10 16:20:54 -05:00
|
|
|
#![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}>;
|
|
|
|
}
|