]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | // Test that a concrete const type i.e. A<2>, can be used as an argument type in a function |
2 | // run-pass | |
48663c56 XL |
3 | |
4 | struct A<const N: usize>; // ok | |
5 | ||
6 | fn with_concrete_const_arg(_: A<2>) -> u32 { 17 } | |
7 | ||
8 | fn main() { | |
9 | let val: A<2> = A; | |
10 | assert_eq!(with_concrete_const_arg(val), 17); | |
11 | } |