We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a29eca5 commit c7deb5bCopy full SHA for c7deb5b
src/test/ui/const-generics/const-arg-in-fn.rs
@@ -0,0 +1,13 @@
1
+// run-pass
2
+
3
+#![feature(const_generics)]
4
+//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5
6
+fn const_u32_identity<const X: u32>() -> u32 {
7
+ X
8
+}
9
10
+ fn main() {
11
+ let val = const_u32_identity::<18>();
12
+ assert_eq!(val, 18);
13
src/test/ui/const-generics/const-arg-in-fn.stderr
@@ -0,0 +1,6 @@
+warning: the feature `const_generics` is incomplete and may cause the compiler to crash
+ --> $DIR/const-arg-in-fn.rs:3:12
+ |
+LL | #![feature(const_generics)]
+ | ^^^^^^^^^^^^^^
0 commit comments