summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/argument_order.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/argument_order.rs')
-rw-r--r--src/test/ui/const-generics/argument_order.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/argument_order.rs b/src/test/ui/const-generics/argument_order.rs
new file mode 100644
index 000000000..196d9b8a1
--- /dev/null
+++ b/src/test/ui/const-generics/argument_order.rs
@@ -0,0 +1,15 @@
+struct Bad<const N: usize, T> {
+ arr: [u8; { N }],
+ another: T,
+}
+
+struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
+ //~^ ERROR lifetime parameters must be declared prior
+ a: &'a T,
+ b: &'b U,
+}
+
+fn main() {
+ let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
+ //~^ ERROR lifetime provided when a type was expected
+ }