summary refs log tree commit diff
path: root/src/test/ui/const-generics/raw-ptr-const-param.rs
blob: 237b410e073d6f886b617bfc40f30434b16c7cd7 (plain)
1
2
3
4
5
6
7
8
9
#![feature(const_generics)]
//~^ 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 _ }>;
}