diff options
| author | bors <bors@rust-lang.org> | 2023-07-26 21:21:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-26 21:21:19 +0000 |
| commit | 0d95f9132909ae7c5f2456748d0ffd1c3ba4a8e8 (patch) | |
| tree | 99e18f79a8e7c88f0cccd997d2070efdbdd38bfe /src | |
| parent | fb7e6d078d83d2d06b0c1fd27c97767545f105d7 (diff) | |
| parent | 9d3e35ceaaa6d38b0f5e2eb1b815fa0c2cf71262 (diff) | |
| download | rust-0d95f9132909ae7c5f2456748d0ffd1c3ba4a8e8.tar.gz rust-0d95f9132909ae7c5f2456748d0ffd1c3ba4a8e8.zip | |
Auto merge of #113843 - wesleywiser:replace_rustc_apfloat, r=pnkfelix
Replace in-tree `rustc_apfloat` with the new version of the crate Replace the in-tree version of `rustc_apfloat` with the new version of the crate which has been correctly licensed. The new crate incorporates upstream changes from LLVM since the original port was done including many correctness fixes and has been extensively fuzz tested to validate correctness. Fixes #100233 Fixes #102403 Fixes #113407 Fixes #113409 Fixes #55993 Fixes #93224 Closes #93225 Closes #109573
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/src/shims/foreign_items.rs | 10 | ||||
| -rw-r--r-- | src/tools/tidy/src/deps.rs | 2 | ||||
| -rw-r--r-- | src/tools/tidy/src/style.rs | 4 |
3 files changed, 2 insertions, 14 deletions
diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index c753eadbbad..763fa9235d0 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -914,16 +914,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let x = this.read_scalar(x)?.to_f64()?; let exp = this.read_scalar(exp)?.to_i32()?; - // Saturating cast to i16. Even those are outside the valid exponent range so - // `scalbn` below will do its over/underflow handling. - let exp = if exp > i32::from(i16::MAX) { - i16::MAX - } else if exp < i32::from(i16::MIN) { - i16::MIN - } else { - exp.try_into().unwrap() - }; - let res = x.scalbn(exp); this.write_scalar(Scalar::from_f64(res), dest)?; } diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index bfb967213e1..57cbfe68be4 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -46,6 +46,7 @@ const EXCEPTIONS: &[(&str, &str)] = &[ ("instant", "BSD-3-Clause"), // rustc_driver/tracing-subscriber/parking_lot ("mdbook", "MPL-2.0"), // mdbook ("openssl", "Apache-2.0"), // opt-dist + ("rustc_apfloat", "Apache-2.0 WITH LLVM-exception"), // rustc (license is the same as LLVM uses) ("ryu", "Apache-2.0 OR BSL-1.0"), // cargo/... (because of serde) ("self_cell", "Apache-2.0"), // rustc (fluent translations) ("snap", "BSD-3-Clause"), // rustc @@ -224,6 +225,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[ "rustc-hash", "rustc-rayon", "rustc-rayon-core", + "rustc_apfloat", "rustc_version", "rustix", "ruzstd", // via object in thorin-dwp diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index d0257d71697..11480e2be60 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -302,10 +302,6 @@ pub fn check(path: &Path, bad: &mut bool) { return; } } - // apfloat shouldn't be changed because of license problems - if is_in(file, "compiler", "rustc_apfloat") { - return; - } let mut skip_cr = contains_ignore_directive(can_contain, &contents, "cr"); let mut skip_undocumented_unsafe = contains_ignore_directive(can_contain, &contents, "undocumented-unsafe"); |
