diff options
Diffstat (limited to 'tests/ui/static/static-vec-repeat-not-constant.rs')
| -rw-r--r-- | tests/ui/static/static-vec-repeat-not-constant.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/static/static-vec-repeat-not-constant.rs b/tests/ui/static/static-vec-repeat-not-constant.rs new file mode 100644 index 00000000000..61c87b144d9 --- /dev/null +++ b/tests/ui/static/static-vec-repeat-not-constant.rs @@ -0,0 +1,6 @@ +fn foo() -> isize { 23 } + +static a: [isize; 2] = [foo(); 2]; +//~^ ERROR: E0015 + +fn main() {} |
