summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/const-param-before-other-params.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/const-param-before-other-params.rs')
-rw-r--r--src/test/ui/const-generics/const-param-before-other-params.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/const-param-before-other-params.rs b/src/test/ui/const-generics/const-param-before-other-params.rs
new file mode 100644
index 000000000..da06aca30
--- /dev/null
+++ b/src/test/ui/const-generics/const-param-before-other-params.rs
@@ -0,0 +1,7 @@
+fn bar<const X: u8, 'a>(_: &'a ()) {
+ //~^ ERROR lifetime parameters must be declared prior to const parameters
+}
+
+fn foo<const X: u8, T>(_: &T) {}
+
+fn main() {}