diff options
Diffstat (limited to 'tests/ui/const-generics/const-param-before-other-params.rs')
-rw-r--r-- | tests/ui/const-generics/const-param-before-other-params.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/const-generics/const-param-before-other-params.rs b/tests/ui/const-generics/const-param-before-other-params.rs new file mode 100644 index 000000000..cb1cebe1f --- /dev/null +++ b/tests/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 type and const parameters +} + +fn foo<const X: u8, T>(_: &T) {} + +fn main() {} |