Change a fixed crash test to a standard test

Fixes <https://github.com/rust-lang/rust/issues/122587>
This commit is contained in:
Trevor Gross 2024-06-21 03:51:11 -04:00
parent 6fb6c19c96
commit 28ce7cd03e
2 changed files with 14 additions and 5 deletions

View File

@ -1,5 +0,0 @@
//@ known-bug: #122587
const b: f16 = 0.0f16;
pub fn main() {
let b = 0.0f16;
}

View File

@ -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!() };
}