about summary refs log tree commit diff
path: root/src/test/ui/const-generics/raw-ptr-const-param.rs
blob: a04c6d5e64e1983afe735d761038228bee262d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
// revisions: full min

#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

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 _ }>;
}