Skip to content

Commit 1960f39

Browse files
authored
Rollup merge of rust-lang#78425 - chansuke:move_nan, r=jyn514
Move f64::NAN ui tests into `library` This is a partial fix of rust-lang#76268. r? ``@matklad``
2 parents c25ac7e + f9b139f commit 1960f39

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

library/core/tests/num/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ mod bignum;
2727
mod dec2flt;
2828
mod flt2dec;
2929

30+
mod nan;
31+
3032
/// Adds the attribute to all items in the block.
3133
macro_rules! cfg_block {
3234
($(#[$attr:meta]{$($it:item)*})*) => {$($(

src/test/ui/format-nan.rs library/core/tests/num/nan.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// run-pass
2-
3-
pub fn main() {
4-
use std::f64;
1+
#[test]
2+
fn test_nan() {
3+
use core::f64;
54
let x = "NaN".to_string();
65
assert_eq!(format!("{}", f64::NAN), x);
76
assert_eq!(format!("{:e}", f64::NAN), x);

0 commit comments

Comments
 (0)