summary refs log tree commit diff
path: root/src/test/ui/inline-const/const-match-pat-generic.rs
blob: 61680d653d021b2846a62932fde9826f1b46c8a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![allow(incomplete_features)]
#![feature(inline_const)]

// rust-lang/rust#82518: ICE with inline-const in match referencing const-generic parameter

fn foo<const V: usize>() {
  match 0 {
    const { V } => {},
    //~^ ERROR const parameters cannot be referenced in patterns [E0158]
    _ => {},
  }
}

fn main() {
    foo::<1>();
}