summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/typod-const-in-const-param-def.rs
blob: 85d3ebba57a3b7af027dcd2ceef517dc7cebd167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub fn foo<Const N: u8>() {}
//~^ ERROR `const` keyword was mistyped as `Const`

pub fn bar<Const>() {}
// OK

pub fn baz<Const N: u8, T>() {}
//~^ ERROR `const` keyword was mistyped as `Const`

pub fn qux<T, Const N: u8>() {}
//~^ ERROR `const` keyword was mistyped as `Const`

pub fn quux<T, Const N: u8, U>() {}
//~^ ERROR `const` keyword was mistyped as `Const`

fn main() {}