mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Change a fixed crash test to a standard test
Fixes <https://github.com/rust-lang/rust/issues/122587>
This commit is contained in:
parent
6fb6c19c96
commit
28ce7cd03e
@ -1,5 +0,0 @@
|
||||
//@ known-bug: #122587
|
||||
const b: f16 = 0.0f16;
|
||||
pub fn main() {
|
||||
let b = 0.0f16;
|
||||
}
|
14
tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs
Normal file
14
tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs
Normal 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!() };
|
||||
}
|
Loading…
Reference in New Issue
Block a user