-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 17 pull requests #58644
Merged
Merged
Rollup of 17 pull requests #58644
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
This keeps the slice based iteration and updates the iterator state after each slice. It also uses a loop to reduce the amount of code. This uses unsafe code, so some thorough review would be appreciated.
We can now use `?`
Before this commit, if the builtin target was found, but an error happened when instantiating it (e.g. validating the target specification file failed, etc.), then we ignored those errors and proceeded to try to find a `target_triple.json` file, and if that failed, reported that as an error. With this commit, if rustc is supposed to provide the builtin target, and something fails while instantiating it, that error will get properly propagated.
The solution which uses braces to release the borrow before it is moved is only required to satisfy the 2015 edition borrow checker. All other examples give the expected results for both 2015 and 2018 editions.
Miri has been moved to `rust-lang` a couple of days ago.
This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.
…r=SimonSapin Deprecate the unstable Vec::resize_default As a way to either get additional feedback to stabilize or help move nightly users off it. Tracking issue: rust-lang#41758 (comment) r? @SimonSapin
deprecate before_exec in favor of unsafe pre_exec Fixes rust-lang#39575 As per the [lang team decision](rust-lang#39575 (comment)): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
…s-surrounding-lifetimes, r=estebank Suggest removing parentheses surrounding lifetimes Fixes rust-lang#57386. r? @estebank
fix overlapping references in BTree This fixes two kinds of overlapping references in BTree (both found by running the BTree test suite in Miri). In `into_slices_mut`, we did `k.into_key_slice_mut()` followed by `self.into_val_slice_mut()` (where `k` is a copy of `self`). Calling `into_val_slice_mut` calls `self.len()`, which creates a shared reference to `NodeHeader`, which unfortunately (due to padding) overlaps with the mutable reference returned by `into_key_slice_mut`. Hence the key slice got (partially) invalidated. The fix is to avoid creating an `&NodeHeader` after the first slice got created. In the iterators, we used to first create the references that will be returned, and then perform the walk on the tree. Walking the tree creates references (such as `&mut InternalNode`) that overlap with all of the keys and values stored in a pointer; in particular, they overlap with the references the iterator will later return. This is fixed by reordering the operations of walking the tree and obtaining the inner references. The test suite still passes (and it passes in Miri now!), but there is a lot of code here that I do not understand...
Add a note about 2018e if someone uses `try {` in 2015e Inspired by rust-lang#58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors. What's the philosophy about gating for this? The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_. Let me know if I should do differently. Resolves rust-lang#53672
remove a bit of dead code [Six years](rust-lang@5dc5efe) seem to be a long enough transition period 🤣
cleanup macro after 2018 transition We can now use `?`
…ruction, r=GuillaumeGomez Dedup a rustdoc diagnostic construction None
…frewsxcv fix small documentation typo Thanks to @stjepang for catching my mistake.
Search for target_triple.json only if builtin target not found Before this commit, if the builtin target was found, but an error happened when instantiating it (e.g. validating the target specification file failed, etc.), then we ignored those errors and proceeded to try to find a `target_triple.json` file, and if that failed, reported that as an error. With this commit, if rustc is supposed to provide the builtin target, and something fails while instantiating it, that error will get properly propagated. r? @oli-obk
… r=alexcrichton Docs: put Future trait into spotlight If a function returns a type that implements `Future`, there should be a small "i" symbol next to it indicating the return type implements an important trait.
…n, r=matthewjasper Fixes rust-lang#58586: Make E0505 erronous example fail for the 2018 edition The original example worked for 2015, but not the 2018 edition of Rust. Borrowing the moved value after ownership is transferred seems required for 2018. [this](rust-lang/rust@rust-lang:f66e469...gurgalex:b2a02c8#diff-4ca866aea4a6efecd732f1975faaad88R1564) line though is correct for 2018, but not for the 2015 edition. Fix rust-lang#58586
…oli-obk miri: explain why we use static alignment in ref-to-place conversion @eddyb @oli-obk do you think this makes sense? Or should we use the run-time alignment (`align_of_val`)? I am a bit worried about custom DSTs, but that affects way more areas of Miri so I'd ignore them for now. r? @oli-obk
…marks, r=KodrAus introduce benchmarks of BTreeSet.intersection 16 tests combining 4 kinds of contents with different sizes exposing edge cases. The ones with asymmetric sizes are addressed by rust-lang#58577. The pos_vs_neg cases seems (are were meant to be) the same as the neg_vs_pos case (same thing, reverse order) but reality shows a surprsing 25% difference.
Update miri links Miri has been moved to `rust-lang` a couple of days ago.
Make std feature list sorted This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.
@bors r+ p=17 |
📌 Commit a8a343a 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
Feb 22, 2019
⌛ Testing commit a8a343a with merge 2cc71fe228a780041ba558278b7bc599d9784776... |
@bors retry A job is stuck on AppVeyor. |
bors
added a commit
that referenced
this pull request
Feb 22, 2019
Rollup of 17 pull requests Successful merges: - #57656 (Deprecate the unstable Vec::resize_default) - #58059 (deprecate before_exec in favor of unsafe pre_exec) - #58064 (override `VecDeque::try_rfold`, also update iterator) - #58198 (Suggest removing parentheses surrounding lifetimes) - #58431 (fix overlapping references in BTree) - #58555 (Add a note about 2018e if someone uses `try {` in 2015e) - #58588 (remove a bit of dead code) - #58589 (cleanup macro after 2018 transition) - #58591 (Dedup a rustdoc diagnostic construction) - #58600 (fix small documentation typo) - #58601 (Search for target_triple.json only if builtin target not found) - #58606 (Docs: put Future trait into spotlight) - #58607 (Fixes #58586: Make E0505 erronous example fail for the 2018 edition) - #58615 (miri: explain why we use static alignment in ref-to-place conversion) - #58620 (introduce benchmarks of BTreeSet.intersection) - #58621 (Update miri links) - #58632 (Make std feature list sorted) Failed merges: r? @ghost
☀️ Test successful - checks-travis, status-appveyor |
☀️ Test successful - checks-travis, status-appveyor |
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:
VecDeque::try_rfold
, also update iterator #58064 (overrideVecDeque::try_rfold
, also update iterator)try {
in 2015e #58555 (Add a note about 2018e if someone usestry {
in 2015e)Failed merges:
r? @ghost