]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/concrete-const-as-fn-arg.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / const-generics / concrete-const-as-fn-arg.rs
CommitLineData
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
4struct A<const N: usize>; // ok
5
6fn with_concrete_const_arg(_: A<2>) -> u32 { 17 }
7
8fn main() {
9 let val: A<2> = A;
10 assert_eq!(with_concrete_const_arg(val), 17);
11}