diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-3521-2.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-3521-2.rs b/src/test/ui/issues/issue-3521-2.rs new file mode 100644 index 000000000..f66efec45 --- /dev/null +++ b/src/test/ui/issues/issue-3521-2.rs @@ -0,0 +1,9 @@ +// run-rustfix +fn main() { + let foo = 100; + + static y: isize = foo + 1; + //~^ ERROR attempt to use a non-constant value in a constant + + println!("{}", y); +} |