about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_resolve/diagnostics.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index a5f9124674a..9965225fe0d 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -1646,8 +1646,11 @@ E0670: r##"
 Const parameters cannot depend on type parameters.
 The following is therefore invalid:
 
-```
+```compile_fail,E0670
+#![feature(const_generics)]
+
 fn const_id<T, const N: T>() -> T {
+    // ERROR: const parameters cannot depend on type parameters
     N
 }
 ```