diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-06-21 03:51:11 -0400 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-06-23 04:28:42 -0500 |
| commit | 28ce7cd03eebd3b28334624422dfa0c24fb89e54 (patch) | |
| tree | 18f27ffe4d38d7d0d8c9a40e2b3eeda1c59181f8 | |
| parent | 6fb6c19c961369b98e2dd9466c1a83ac2d783ae2 (diff) | |
| download | rust-28ce7cd03eebd3b28334624422dfa0c24fb89e54.tar.gz rust-28ce7cd03eebd3b28334624422dfa0c24fb89e54.zip | |
Change a fixed crash test to a standard test
Fixes <https://github.com/rust-lang/rust/issues/122587>
| -rw-r--r-- | tests/crashes/122587-1.rs | 5 | ||||
| -rw-r--r-- | tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/tests/crashes/122587-1.rs b/tests/crashes/122587-1.rs deleted file mode 100644 index ea0e843a10c..00000000000 --- a/tests/crashes/122587-1.rs +++ /dev/null @@ -1,5 +0,0 @@ -//@ known-bug: #122587 -const b: f16 = 0.0f16; -pub fn main() { - let b = 0.0f16; -} diff --git a/tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs b/tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs new file mode 100644 index 00000000000..99d0e472485 --- /dev/null +++ b/tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs @@ -0,0 +1,14 @@ +//@ check-pass +// issue: rust-lang/rust#122587 + +#![feature(f128)] +#![feature(f16)] +#![allow(non_upper_case_globals)] + +const h: f16 = 0.0f16; +const q: f128 = 0.0f128; + +pub fn main() { + let h = 0.0f16 else { unreachable!() }; + let q = 0.0f128 else { unreachable!() }; +} |
