about summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-fn-with-const-param.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/const-fn-with-const-param.rs')
-rw-r--r--src/test/ui/const-generics/const-fn-with-const-param.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/const-generics/const-fn-with-const-param.rs b/src/test/ui/const-generics/const-fn-with-const-param.rs
index e9e236be556..3d8b77bcf7b 100644
--- a/src/test/ui/const-generics/const-fn-with-const-param.rs
+++ b/src/test/ui/const-generics/const-fn-with-const-param.rs
@@ -1,11 +1,11 @@
+// run-pass
 #![feature(const_generics)]
 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
 
 const fn const_u32_identity<const X: u32>() -> u32 {
-    //~^ ERROR const parameters are not permitted in const functions
     X
 }
 
 fn main() {
-    println!("{:?}", const_u32_identity::<18>());
+    assert_eq!(const_u32_identity::<18>(), 18);
 }