diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/const-generics/const-arg-in-fn.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/const-arg-in-fn.rs b/src/test/ui/const-generics/const-arg-in-fn.rs new file mode 100644 index 000000000..9b225b18d --- /dev/null +++ b/src/test/ui/const-generics/const-arg-in-fn.rs @@ -0,0 +1,9 @@ +// run-pass +fn const_u32_identity<const X: u32>() -> u32 { + X +} + + fn main() { + let val = const_u32_identity::<18>(); + assert_eq!(val, 18); +} |