-
Notifications
You must be signed in to change notification settings - Fork 13k
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 10 pull requests #43487
Rollup of 10 pull requests #43487
Conversation
… to remove an `unsafe` block.
… to protect against UB in the unlikely case that `idx + 1` overflows.
On SPARC, optimization fuel ends up emitting incorrect load and store instructions for the transmute() call in blake2b_compress(). If we force Blake2bCtx to be repr(C), the problem disappears. Fixes rust-lang#43346
Point at the correct path segment on a import statement where a module doesn't exist. New output: ```rust error[E0432]: unresolved import `std::bar` --> <anon>:1:10 | 1 | use std::bar::{foo1, foo2}; | ^^^ Could not find `bar` in `std` ``` instead of: ```rust error[E0432]: unresolved import `std::bar::foo1` --> <anon>:1:16 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` error[E0432]: unresolved import `std::bar::foo2` --> <anon>:1:22 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` ```
Make the "main" constructors of NonZero/Shared/Unique return Option Per discussion in rust-lang#27730 (comment). This is a breaking change to unstable APIs. The old behavior is still available under the name `new_unchecked`. Note that only that one can be `const fn`, since `if` is currently not allowed in constant contexts. In the case of `NonZero` this requires adding a new `is_zero` method to the `Zeroable` trait. I mildly dislike this, but it’s not much worse than having a `Zeroable` trait in the first place. `Zeroable` and `NonZero` are both unstable, this can be reworked later.
Point at path segment on module not found Point at the correct path segment on a import statement where a module doesn't exist. New output: ```rust error[E0432]: unresolved import `std::bar` --> <anon>:1:10 | 1 | use std::bar::{foo1, foo2}; | ^^^ Could not find `bar` in `std` ``` instead of: ```rust error[E0432]: unresolved import `std::bar::foo1` --> <anon>:1:16 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` error[E0432]: unresolved import `std::bar::foo2` --> <anon>:1:22 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` ``` Fix rust-lang#43040.
…=steveklabnik add a note to Vec's Extend<&T> impl about its slice specialization From the regular documentation view, it's not at all apparent that [this specialization](/~https://github.com/rust-lang/rust/blob/5669c9988f50788b5ab5dee2d4538519d4e5663d/src/liballoc/vec.rs#L1879-L1891) exists for `slice::Iter`. This adds a documentation blurb to the Extend impl itself to note that this optimization exists.
…chton std::thread::spawn: Fix grammar in documentation Closes rust-lang#43435.
Fix printing regions with -Z verbose When dumping MIR with `-Z verbose`, it would print regions on types, but not in the code. It seems the Rvalue printing code tried to be smart and guessed when the `Display` for `Region` would not possibly print anything. This PR makes it no longer be smart, and just always use the `Display` like all the other code (e.g. printing types) does.
DNS functions are in libresolv on Solaris, just like on MacOS
Fix the spans of catch blocks to include the `do`
…lacrum Add tests for issues with the E-needstest label Fixes rust-lang#19181. Fixes rust-lang#29516. Fixes rust-lang#29798. Fixes rust-lang#33504. Fixes rust-lang#34780. Fixes rust-lang#39211. Fixes rust-lang#39467. Fixes rust-lang#39720.
Add missing impl and tests for int to int TryFrom impls These were missing from rust-lang#43248. r? @nagisa
Constrain the layout of Blake2bCtx for proper SPARC compilation On SPARC, optimization fuel ends up emitting incorrect load and store instructions for the transmute() call in blake2b_compress(). If we force Blake2bCtx to be repr(C), the problem disappears. Fixes rust-lang#43346
r? @BurntSushi (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=10 |
📌 Commit 959ebd6 has been approved by |
⌛ Testing commit 959ebd6 with merge e75dfd129c849aa98926729c004f1ec51ae4781b... |
💔 Test failed - status-appveyor |
|
⌛ Testing commit 959ebd6 with merge 441acb35815d545c21c48b89064f8ed2fbf06001... |
💔 Test failed - status-appveyor |
@bors retry - RLS failure (again, despite attempted fix) - #43453
cc @nrc |
☀️ Test successful - status-appveyor, status-travis |
do
#43463, Add tests for issues with the E-needstest label #43465, Add missing impl and tests for int to int TryFrom impls #43471, Constrain the layout of Blake2bCtx for proper SPARC compilation #43480