-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 16 pull requests #88329
Merged
Merged
Rollup of 16 pull requests #88329
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The architecture auto-detect table has no entry for riscv64 (which rustc uses riscv64gc for the first part of triplet, assuming it's a generic Linux distro). Add it to the table to allow riscv64 systems to bootstrap Rust. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Related discussion in the users forum: https://users.rust-lang.org/t/what-s-this-alleged-difference-between-arc-make-mut-and-rc-make-mut/63747?u=steffahn Also includes small formatting improvement in the documentation of `Rc::make_mut`. This commit makes the two documentations in question complete analogs. The previously claimed point in which one "differs from the behavior of" the other turns out to be incorrect, AFAIK. One remaining inaccuracy: `Weak` pointers aren't disassociated from the allocation but only from the contained value, i.e. in case of outstanding `Weak` pointers there still is a new allocation created, just the call to `.clone()` is avoided, instead the value is moved from one allocation to the other.
Post-bootstrap-update cleanup.
Instead, avoid registering the problematic well-formed obligation to begin with. This removes global untracked mutable state, and avoids potential issues with incremental compilation.
Previously, converting `&mut [T; N]` to `&[Cell<T>; N]` looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(&mut array[..]) .as_slice_of_cells() .try_into() .unwrap(); With this new helper method, it looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(array).as_array_of_cells();
There was no rationale for the previous ordering. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
It is useful to keep some coherent structure to this ordering. In particular, Other and Uncategorized should be next to each other, at the end. Also it seems to make sense to treat UnexpectedEof and OutOfMemory specially, since they are not like the other errors (despite OutOfMemory also being generatable by some OS errors). So: * Move Other to the end, just before Uncategorized * Move Unsupported to between Interrupted and UnexpectedEof * Add some comments documenting where to add things Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
…noting the fact that `clone` is not called. Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
…ttmcm add Cell::as_array_of_cells, similar to Cell::as_slice_of_cells I'd like to propose adding `Cell::as_array_of_cells`, as a natural analog to `Cell::as_slice_of_cells`. I don't have a specific use case in mind, other than that supporting slices but not arrays feels like a gap. Do other folks agree with that intuition? Would this addition be substantial enough to need an RFC? --- Previously, converting `&mut [T; N]` to `&[Cell<T>; N]` looks like this: ```rust let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(&mut array[..]) .as_slice_of_cells() .try_into() .unwrap(); ``` With this new helper method, it looks like this: ```rust let array = &mut [1, 2, 3]; let cells = Cell::from_mut(array).as_array_of_cells(); ```
…ark-Simulacrum Adjust / fix documentation of `Arc::make_mut` Related discussion in the users forum: [Whatʼs this alleged difference between Arc::make_mut and Rc::make_mut? – The Rust Programming Language Forum](https://users.rust-lang.org/t/what-s-this-alleged-difference-between-arc-make-mut-and-rc-make-mut/63747?u=steffahn) Also includes a small formatting improvement in the documentation of `Rc::make_mut`. This PR makes the two documentations in question complete analogs. The previously claimed point in which one “differs from the behavior of” the other turns out to be incorrect, AFAIK. One remaining inaccuracy: `Weak` pointers aren’t disassociated from the allocation but only from the contained value, i.e. in case of outstanding `Weak` pointers there still is a new allocation created, just the call to `.clone()` is avoided, instead the value is moved from one allocation to the other. `@rustbot` label T-libs-api, A-docs
…imulacrum bootstrap.py: recognize riscv64 when auto-detect The architecture auto-detect table has no entry for riscv64 (which rustc uses riscv64gc for the first part of triplet, assuming it's a generic Linux distro). Add it to the table to allow riscv64 systems to bootstrap Rust. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
…ctor, r=Amanieu Refactor `named_asm_labels` to a HIR lint As discussed on rust-lang#88169, the `named_asm_labels` lint could be moved to a HIR lint. That allows future lints or custom plugins or clippy lints to more easily access the `asm!` macro's data and create better error messages with the lints.
Remove `Session.trait_methods_not_found` Instead, avoid registering the problematic well-formed obligation to begin with. This removes global untracked mutable state, and avoids potential issues with incremental compilation.
Remove the `TryV2` alias Post-bootstrap-update cleanup. (No more `try_trait_transition` feature.)
Fix typo “a Rc” → “an Rc” (and a few more) After stumbling about it in the dev-guide, I’ve devided to eliminate all mentions of “a Rc”, replacing it with “an Rc”. E.g. ```plain $ rg "(^|[^'])\ba\b[^\w=:]*\bRc" compiler/rustc_data_structures/src/owning_ref/mod.rs 1149:/// Typedef of a owning reference that uses a `Rc` as the owner. library/std/src/ffi/os_str.rs 919: /// Converts a [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating. library/std/src/ffi/c_str.rs 961: /// Converts a [`CString`] into a [`Rc`]`<CStr>` without copying or allocating. src/doc/rustc-dev-guide/src/query.md 61:are cheaply cloneable; insert a `Rc` if necessary). src/doc/book/src/ch15-06-reference-cycles.md 72:decreases the reference count of the `a` `Rc<List>` instance from 2 to 1 as library/alloc/src/rc.rs 1746: /// Converts a generic type `T` into a `Rc<T>` ``` _(the match in the book is a false positive)_ Since the dev-guide is a submodule, it’s getting a separate PR: rust-lang/rustc-dev-guide#1191 I’ve also gone ahead and done the same search for `RwLock` and hit a few cases in the `OwningRef` adaption. Then, I couldn’t keep the countless cases of “a owning …” or “a owner” unaddressed, which concludes this PR. `@rustbot` label C-cleanup
…matsakis 2229: Update signature for truncate function r? `@nikomatsakis`
Fix references to `ControlFlow` in docs The `Iterator::for_each` method previously stated that it was not possible to use `break` and `continue` in it — this has been updated to acknowledge the stabilization of `ControlFlow`. Additionally, `ControlFlow` was referred to as `crate::ops::ControlFlow` which is not the correct path for an end user. r? `@jyn514`
Update books ## reference 1 commits in 4884fe45c14f8b22121760fb117181bb4da8dfe0..da6ea9b03f74cae0a292f40315723d7a3a973637 2021-07-28 21:31:28 -0700 to 2021-08-19 21:28:10 -0700 - Allow users to change status labels (rust-lang/reference#1083) ## book 7 commits in 7e49659102f0977d9142190e1ba23345c0f00eb1..687e21bde2ea10c261f79fa14797c5137425098d 2021-08-03 21:41:35 -0400 to 2021-08-18 20:48:38 -0400 - Small tweaks to Ferris size and position - Retain previous height: auto just in case - Shrink and move ferris when possible - Snapshot chapter 6 for nostarch - Demonstrate variable as catch-all for match. Fixes rust-lang/book#1868. - Improve the if let example to have a binding pattern. Fixes rust-lang/book#1401. - Fixes typo (rust-lang/book#2816) ## rust-by-example 1 commits in 0dc9cd4e89f00cb5230f120e1a083916386e422b..04f489c889235fe3b6dfe678ae5410d07deda958 2021-07-23 09:14:27 -0300 to 2021-08-17 08:01:20 -0300 - Grammar mistake (rust-lang/rust-by-example#1456) ## rustc-dev-guide 5 commits in c4644b427cbdaafc7a87be0ccdf5d8aaa07ac35f..cf0e151b7925a40f13fbc6573c6f97d5f94c7c17 2021-08-10 20:41:44 +0900 to 2021-08-22 11:47:02 -0300 - Fix typo “a Rc” → “an Rc” (rust-lang/rustc-dev-guide#1191) - Expand THIR section with more details (rust-lang/rustc-dev-guide#1183) - Remove docs for old -Z profile-queries flag - update mdbook version to latest - allow to quickly edit a page directly on github
…Mark-Simulacrum Add SAFETY comments to core::slice::sort::partition_in_blocks A few more SAFETY comments for rust-lang#66219. There are still a few more in this module. `@rustbot` label T-libs T-compiler C-cleanup
Fix grammar in alloc test
Errorkind reorder I was doing a bit more work in this area and the untidiness of these two orderings bothered me. The commit messages have the detailed rationale. For your convenience, I c&p them here: ``` io::ErrorKind: rationalise ordering in main enum It is useful to keep some coherent structure to this ordering. In particular, Other and Uncategorized should be next to each other, at the end. Also it seems to make sense to treat UnexpectedEof and OutOfMemory specially, since they are not like the other errors (despite OutOfMemory also being generatable by some OS errors). So: * Move Other to the end, just before Uncategorized * Move Unsupported to between Interrupted and UnexpectedEof * Add some comments documenting where to add things ``` ``` io::Error: alphabeticise the match in as_str() There was no rationale for the previous ordering. ``` r? kennytm since that's who rust-highfive picked before, in rust-lang#88294 which I accidentally closed.
Stabilise BufWriter::into_parts The FCP for this has already completed, in rust-lang#80690. This was just blocked on rust-lang#85901 (which changed the name), which is now merged. The original stabilisation MR was rust-lang#84770 but that has a lot of noise in it, and I also accidentally deleted the branch while trying to tidy up. So here is a new MR. Sorry for the noise. Closes rust-lang#80690
… r=oli-obk Add type of a let tait test r? `@oli-obk` Related to rust-lang#86727
Add mutable-noalias to the release notes for 1.54 It was enabled in rust-lang#82834 and disabled in 1.53 by rust-lang#86036, but it was never disabled on (then) nightly, so it still landed in 1.54. This was mentioned on rust-lang#86696 but never made it into the release notes. r? `@XAMPPRocky` cc `@nikic`
@bors r+ rollup=never p=16 |
📌 Commit d9ed23a has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Aug 25, 2021
☀️ Test successful - checks-actions |
This was referenced Aug 25, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
Arc::make_mut
#88156 (Adjust / fix documentation ofArc::make_mut
)named_asm_labels
to a HIR lint #88196 (Refactornamed_asm_labels
to a HIR lint)Session.trait_methods_not_found
#88218 (RemoveSession.trait_methods_not_found
)TryV2
alias #88223 (Remove theTryV2
alias)ControlFlow
in docs #88273 (Fix references toControlFlow
in docs)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup