]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/concrete-const-as-fn-arg.rs
pin docs: add some forward references
[rust.git] / src / test / ui / const-generics / concrete-const-as-fn-arg.rs
1 // Test that a concrete const type i.e. A<2>, can be used as an argument type in a function
2 // run-pass
3
4 #![feature(const_generics)]
5 //~^ WARN the feature `const_generics` is incomplete
6
7 struct A<const N: usize>; // ok
8
9 fn with_concrete_const_arg(_: A<2>) -> u32 { 17 }
10
11 fn main() {
12     let val: A<2> = A;
13     assert_eq!(with_concrete_const_arg(val), 17);
14 }