We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9f9784 commit 9075bafCopy full SHA for 9075baf
tests/ui/array_len_expr.rs
@@ -0,0 +1,9 @@
1
+#[cxx::bridge]
2
+mod ffi {
3
+ unsafe extern "C++" {
4
+ fn arraystr() -> [String; "13"];
5
+ fn arraysub() -> [String; 15 - 1];
6
+ }
7
+}
8
+
9
+fn main() {}
tests/ui/array_len_expr.stderr
@@ -0,0 +1,11 @@
+error: array length must be an integer literal
+ --> $DIR/array_len_expr.rs:4:35
+ |
+4 | fn arraystr() -> [String; "13"];
+ | ^^^^
+error: unsupported expression, array length must be an integer literal
+ --> $DIR/array_len_expr.rs:5:35
10
+5 | fn arraysub() -> [String; 15 - 1];
11
+ | ^^^^^^
0 commit comments