rust/src/test/ui/const-generics/raw-ptr-const-param.rs

10 lines
326 B
Rust
Raw Normal View History

#![feature(const_generics)]
2020-04-22 03:21:32 -05:00
//~^ WARN the feature `const_generics` is incomplete
struct Const<const P: *const u32>; //~ ERROR: using raw pointers as const generic parameters
fn main() {
let _: Const<{ 15 as *const _ }> = Const::<{ 10 as *const _ }>;
let _: Const<{ 10 as *const _ }> = Const::<{ 10 as *const _ }>;
}