-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 13 pull requests #73498
Rollup of 13 pull requests #73498
Commits on May 24, 2020
-
When `x` has large magnitude, `x + ((x * x) + 1.0).sqrt()` approaches `x + x.abs()`. For negative values of `x`, this leads to catastrophic cancellation, resulting in large errors or even 0 being passed to `ln`, producing incorrect results including `-inf`. Becuase asinh is an odd function, i.e. -asinh(x) = asinh(-x) for all x, we can avoid the catastrophic cancellation and obtain correct results by taking the absolute value of `self` for the first term. `self * self` is always positive, so in effect this gives us `x.abs().asinh().copysign(x)` which as discussed above is algebraically equivalent, but is much more accurate.
Configuration menu - View commit details
-
Copy full SHA for 730f736 - Browse repository at this point
Copy the full SHA 730f736View commit details
Commits on May 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f7d745f - Browse repository at this point
Copy the full SHA f7d745fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6d03c - Browse repository at this point
Copy the full SHA 7a6d03cView commit details
Commits on Jun 7, 2020
-
Don't intern memory in const prop.
This isn't sound without validation. We don't want to report errors in case of failure to intern and validate, we just don't want to const prop. Interning and const prop is not built for this, let's not do it until we have a clearer picture on aggregate propagation.
Configuration menu - View commit details
-
Copy full SHA for 20abc70 - Browse repository at this point
Copy the full SHA 20abc70View commit details
Commits on Jun 9, 2020
-
Stop allowing
Indirect(..)
values to be propagatedCloses rust-lang#72679 Closes rust-lang#72372 Closes rust-lang#72285
Configuration menu - View commit details
-
Copy full SHA for 1e88f13 - Browse repository at this point
Copy the full SHA 1e88f13View commit details
Commits on Jun 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9ceb9bb - Browse repository at this point
Copy the full SHA 9ceb9bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 638ebbc - Browse repository at this point
Copy the full SHA 638ebbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 961974f - Browse repository at this point
Copy the full SHA 961974fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d29883 - Browse repository at this point
Copy the full SHA 5d29883View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9ac01a - Browse repository at this point
Copy the full SHA e9ac01aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 43905cd - Browse repository at this point
Copy the full SHA 43905cdView commit details
Commits on Jun 14, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d5ea0e9 - Browse repository at this point
Copy the full SHA d5ea0e9View commit details -
Add rust features to print target features
`crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there.
Configuration menu - View commit details
-
Copy full SHA for e32db84 - Browse repository at this point
Copy the full SHA e32db84View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40156e - Browse repository at this point
Copy the full SHA a40156eView commit details
Commits on Jun 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0906066 - Browse repository at this point
Copy the full SHA 0906066View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3ca6fd - Browse repository at this point
Copy the full SHA d3ca6fdView commit details -
Update src/librustc_typeck/check/cast.rs
Co-authored-by: lzutao <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b5809b0 - Browse repository at this point
Copy the full SHA b5809b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10c8d2a - Browse repository at this point
Copy the full SHA 10c8d2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0975b9 - Browse repository at this point
Copy the full SHA e0975b9View commit details
Commits on Jun 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f3dfe80 - Browse repository at this point
Copy the full SHA f3dfe80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1990f97 - Browse repository at this point
Copy the full SHA 1990f97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4506a35 - Browse repository at this point
Copy the full SHA 4506a35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f50f84 - Browse repository at this point
Copy the full SHA 9f50f84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 457acbd - Browse repository at this point
Copy the full SHA 457acbdView commit details
Commits on Jun 17, 2020
-
Separate target features from rust ones with a blank line Co-authored-by: Josh Stone <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for caffb28 - Browse repository at this point
Copy the full SHA caffb28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6351850 - Browse repository at this point
Copy the full SHA 6351850View commit details -
Reduce pointer casts in Box::into_boxed_slice
We only need to cast the pointer once to change `Box<T>` to an array `Box<[T; 1]>`, then we can let unsized coercion return `Box<[T]>`.
Configuration menu - View commit details
-
Copy full SHA for a7c2cf8 - Browse repository at this point
Copy the full SHA a7c2cf8View commit details
Commits on Jun 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d134870 - Browse repository at this point
Copy the full SHA d134870View commit details -
Configuration menu - View commit details
-
Copy full SHA for abb5800 - Browse repository at this point
Copy the full SHA abb5800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aecafe - Browse repository at this point
Copy the full SHA 8aecafeView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec8ff1c - Browse repository at this point
Copy the full SHA ec8ff1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 111c2d2 - Browse repository at this point
Copy the full SHA 111c2d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a9ff05 - Browse repository at this point
Copy the full SHA 5a9ff05View commit details
Commits on Jun 19, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 35a2915 - Browse repository at this point
Copy the full SHA 35a2915View commit details -
Rollup merge of rust-lang#70740 - haraldh:static-pie, r=petrochenkov
Enabling static-pie for musl and make it the default for the x86_64-unknown-linux-musl target This is a quick implementation for rust-lang#70693 Opening it as a draft PR to gather some feedback, before I put more work in it. ```console ❯ cat hello.rs fn main() { println!("main = {:#x}", &main as *const _ as usize); } ❯ /tmp/rust-musl/bin/rustc --target x86_64-unknown-linux-musl ~/hello.rs ❯ ldd hello statically linked ❯ file hello hello: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=fec5cdc170f503a712a63a6958691ce5ce433654, with debug_info, not stripped ❯ ./hello main = 0x7f233ca30008 ❯ ./hello main = 0x7f9ddc529008 ❯ ./hello main = 0x7f1e5a224008 ❯ ./hello main = 0x7f4485c7c008 ❯ /tmp/rust-musl/bin/rustc --target x86_64-unknown-linux-musl -Z print-link-args ~/hello.rs "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--eh-frame-hdr" "-m64" "-nostdlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/rcrt1.o" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "hello.hello.7rcbfp3g-cgu.0.rcgu.o" "hello.hello.7rcbfp3g-cgu.1.rcgu.o" "hello.hello.7rcbfp3g-cgu.2.rcgu.o" "hello.hello.7rcbfp3g-cgu.3.rcgu.o" "hello.hello.7rcbfp3g-cgu.4.rcgu.o" "hello.hello.7rcbfp3g-cgu.5.rcgu.o" "-o" "hello" "hello.1nxjf9so94czdgcz.rcgu.o" "-Wl,--gc-sections" "-static-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-0f9cb7646f9e2c34.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-ba857f2f2e4e7187.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-58ba5e25bbdf9d29.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-886bfe43afa847dc.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace-fbfb8fe99f19a67b.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace_sys-85fa859e7d364cc9.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-07ab026cd3ec0d82.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-a8ec5932d92ea864.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-0ba4cc2f38a198d5.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-c1bb2b3ce4f78b7c.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-0ff673c1cf0d451a.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-c8ff2001db856926.rlib" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-2ae14177140eeca2.rlib" "-Wl,--end-group" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-4fd81b5ce1b08a9c.rlib" "-static" "-Wl,-Bdynamic" "/tmp/rust-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o" ``` Closes rust-lang#70693 Closes rust-lang#53968
Configuration menu - View commit details
-
Copy full SHA for 27d4737 - Browse repository at this point
Copy the full SHA 27d4737View commit details -
Rollup merge of rust-lang#72331 - oddg:forbid-cast-of-cenum-implement…
…ing-drop, r=matthewjasper,nikomatsakis Report error when casting an C-like enum implementing Drop Following approach described in rust-lang#35941
Configuration menu - View commit details
-
Copy full SHA for 9c54c65 - Browse repository at this point
Copy the full SHA 9c54c65View commit details -
Rollup merge of rust-lang#72486 - Ralith:asinh-fix, r=dtolnay
Fix asinh of negative values Rust's current implementation of asinh has [large errors](https://www.wolframalpha.com/input/?i=arcsinh%28x%29%2C+ln%28x%2B%28x%5E2%2B1%29%5E0.5%29%2C+x+from+-67452095.07139316+to+0) in its negative range. ~These are (mostly) not numerical, but rather seem due to an incorrect implementation.~ This appears to be due to avoidable catastrophic cancellation. [Playground before/after](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bd04ae6d86d06612e4e389a8b95d19ab). [glibc uses](https://github.com/bminor/glibc/blob/81dca813cc35f91414731fdd0ff6b756d5e1827f/sysdeps/ieee754/dbl-64/s_asinh.c#L56) abs here. Many thanks to @danieldeankon for finding this weird behavior, @jebrosen for diagnosing it, and @toasteater for identifying the probable implementation error!
Configuration menu - View commit details
-
Copy full SHA for 99be102 - Browse repository at this point
Copy the full SHA 99be102View commit details -
Rollup merge of rust-lang#72497 - RalfJung:tag-term, r=oli-obk
tag/niche terminology cleanup The term "discriminant" was used in two ways throughout the compiler: * every enum variant has a corresponding discriminant, that can be given explicitly with `Variant = N`. * that discriminant is then encoded in memory to store which variant is active -- but this encoded form of the discriminant was also often called "discriminant", even though it is conceptually quite different (e.g., it can be smaller in size, or even use niche-filling). After discussion with @eddyb, this renames the second term to "tag". The way the tag is encoded can be either `TagEncoding::Direct` (formerly `DiscriminantKind::Tag`) or `TagEncoding::Niche` (formerly `DiscrimianntKind::Niche`). This finally resolves some long-standing confusion I had about the handling of variant indices and discriminants, which surfaced in rust-lang#72419. (There is also a `DiscriminantKind` type in libcore, it remains unaffected. I think this corresponds to the discriminant, not the tag, so that seems all right.) r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 5e7eec2 - Browse repository at this point
Copy the full SHA 5e7eec2View commit details -
Rollup merge of rust-lang#72999 - mati865:separate-self-contained-dir…
…, r=Mark-Simulacrum Create self-contained directory and move there some of external binaries/libs One of the steps to reach design described in rust-lang#68887 (comment) This PR moves things around and allows link code to handle the new directory structure.
Configuration menu - View commit details
-
Copy full SHA for ea3c309 - Browse repository at this point
Copy the full SHA ea3c309View commit details -
Rollup merge of rust-lang#73130 - wesleywiser:remove_const_prop_for_i…
…ndirects, r=oli-obk Remove const prop for indirects This was only used by one mir-opt test and since it causes buggy behavior under `-Zmir-opt-level=2`, it seems like we should remove it. This was split out from rust-lang#71946. Closes rust-lang#72679 Closes rust-lang#72372 Closes rust-lang#72285
Configuration menu - View commit details
-
Copy full SHA for 098949b - Browse repository at this point
Copy the full SHA 098949bView commit details -
Rollup merge of rust-lang#73142 - ehuss:std-benches, r=dtolnay
Ensure std benchmarks get tested. This ensures that the std benchmarks don't break in the future. Currently they aren't compiled or tested on CI, so they can easily bitrot. Testing a benchmark runs it with one iteration. Adding these should only add a few seconds to CI. Closes rust-lang#54176 Closes rust-lang#61913
Configuration menu - View commit details
-
Copy full SHA for 78f3e9c - Browse repository at this point
Copy the full SHA 78f3e9cView commit details -
Rollup merge of rust-lang#73305 - crlf0710:disallow_loading_monsters,…
… r=petrochenkov Disallow loading crates with non-ascii identifier name. This turns off external crate loading with non-ascii identifier names. cc rust-lang#55467.
Configuration menu - View commit details
-
Copy full SHA for 3b4bec2 - Browse repository at this point
Copy the full SHA 3b4bec2View commit details -
Rollup merge of rust-lang#73346 - aszenz:patch-1, r=cuviper
Add rust specific features to print target features Fixes rust-lang#71583 `crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows under `rustc --print target-features`. Probably the most native implementation I could think of, would love to get feedback.
Configuration menu - View commit details
-
Copy full SHA for 8d79ebd - Browse repository at this point
Copy the full SHA 8d79ebdView commit details -
Rollup merge of rust-lang#73362 - erikdesjardins:bounds, r=nikomatsakis
Test that bounds checks are elided when slice len is checked up-front Closes rust-lang#69101
Configuration menu - View commit details
-
Copy full SHA for 7d3238f - Browse repository at this point
Copy the full SHA 7d3238fView commit details -
Rollup merge of rust-lang#73459 - cuviper:into_boxed_slice-unicast, r…
…=dtolnay Reduce pointer casts in Box::into_boxed_slice We only need to cast the pointer once to change `Box<T>` to an array `Box<[T; 1]>`, then we can let unsized coercion return `Box<[T]>`.
Configuration menu - View commit details
-
Copy full SHA for fc2ce7c - Browse repository at this point
Copy the full SHA fc2ce7cView commit details -
Rollup merge of rust-lang#73464 - qy3u:fs-document-format-correction,…
… r=jonas-schievink Document format correction Minor amendments to the document. r? @steveklabnik
Configuration menu - View commit details
-
Copy full SHA for f7d833e - Browse repository at this point
Copy the full SHA f7d833eView commit details -
Rollup merge of rust-lang#73479 - pickfire:liballoc-spell, r=dtolnay
Minor tweaks to liballoc
Configuration menu - View commit details
-
Copy full SHA for 028c908 - Browse repository at this point
Copy the full SHA 028c908View commit details