diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-24 19:07:20 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-08-09 16:27:20 +0500 |
| commit | 16765639b30741dde85da0dbcb44c343eb82b1a2 (patch) | |
| tree | ef7f40e32fab78c39546bc588542774d276e5dc8 /tests/ui/statics/conditional-static-declaration-16010.rs | |
| parent | 90bb5cacb5c1a5fe20ba821d28e7eb7a21e35d09 (diff) | |
| download | rust-16765639b30741dde85da0dbcb44c343eb82b1a2.tar.gz rust-16765639b30741dde85da0dbcb44c343eb82b1a2.zip | |
comments
Diffstat (limited to 'tests/ui/statics/conditional-static-declaration-16010.rs')
| -rw-r--r-- | tests/ui/statics/conditional-static-declaration-16010.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/statics/conditional-static-declaration-16010.rs b/tests/ui/statics/conditional-static-declaration-16010.rs new file mode 100644 index 00000000000..0bc5b0ee86f --- /dev/null +++ b/tests/ui/statics/conditional-static-declaration-16010.rs @@ -0,0 +1,11 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/16010 + +//@ run-pass +#![allow(dead_code)] + +fn main() { + if true { return } + match () { + () => { static MAGIC: usize = 0; } + } +} |
