Skip to content

Commit dee3d44

Browse files
authored
Rollup merge of #139483 - RalfJung:nan, r=tgross35
f*::NAN: guarantee that this is a quiet NaN I think we should guarantee that this is a quiet NaN. This then implies that programs not using `f*::from_bits` (or unsafe type conversions) are guaranteed to only work with quiet NaNs. It would be awkward if people start to write `0.0 / 0.0` instead of using the constant just because they want to get a guaranteed-quiet NaN. This is a `@rust-lang/libs-api` change. The definition of this constant currently is `0.0 / 0.0`, which is already guaranteed to be a quiet NaN. So all this does is forward that guarantee to our users.
2 parents 1258b5a + 3f13620 commit dee3d44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/pass/tls/tls_leak_main_thread_allowed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn main() {
1313
TLS.set(Some(Box::leak(Box::new(123))));
1414

1515
// We can only ignore leaks on targets that use `#[thread_local]` statics to implement
16-
// `thread_local!`. Ignore the test on targest that don't.
16+
// `thread_local!`. Ignore the test on targets that don't.
1717
if cfg!(target_thread_local) {
1818
thread_local! {
1919
static TLS_KEY: Cell<Option<&'static i32>> = Cell::new(None);

0 commit comments

Comments
 (0)