-
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 17 pull requests #81089
Merged
Merged
Rollup of 17 pull requests #81089
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
After partially consuming a Zip adapter and then wrapping it into another Zip where the adapters use their TrustedRandomAccess specializations leads to the outer adapter returning elements which should have already been consumed.
As per T-lang consensus, this uses a branch to handle the dangling case. The discussed optimization of only doing the branch in the T: ?Sized case is left for a followup patch, as doing so is not trivial (as it requires specialization for correctness, not just optimization).
Fix whitespace
Co-authored-by: Esteban Kuber <[email protected]>
There was one directory that had only a single test and there was also a test in the top-level directory. This moves both of them to `feature-gates/`.
Co-authored-by: Ralf Jung <[email protected]>
…s.rs Co-authored-by: Esteban Kuber <[email protected]>
The use of Result allows for making use of a reconstructed original value on failed projections.
…atsakis Remove giant badge in README Is it meant to be this big? I haven't seen any other open source project with this sort of thing
Explain why borrows can't be held across yield point in async blocks For rust-lang#78938.
…ss-composition, r=m-ou-se TrustedRandomAaccess specialization composes incorrectly for nested iter::Zips I found this while working on improvements for TRA. After partially consuming a Zip adapter and then wrapping it into another Zip where the adapters use their `TrustedRandomAccess` specializations leads to the outer adapter returning elements which should have already been consumed. If the optimizer gets tripped up by the addition this might affect performance for chained `zip()` iterators even when the inner one is not partially advanced but it would require more extensive fixes to `TrustedRandomAccess` to communicate those offsets earlier. Included test fails on nightly, [playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=24fa1edf8a104ff31f5a24830593b01f)
…-ou-se Clarify what the effects of a 'logic error' are This clarifies what a 'logic error' is (which is a term used to describe what happens if you put things in a hash table or btree and then use something like a refcell to break the internal ordering). This tries to be as vague as possible, as we don't really want to promise what happens, except "bad things, but not UB". This was discussed in rust-lang#80657
…RalfJung Re-stabilize Weak::as_ptr and friends for unsized T As per [T-lang consensus](https://hackmd.io/7r3_is6uTz-163fsOV8Vfg), this uses a branch to handle the dangling case. The discussed optimization of only doing the branch in the T: ?Sized case is left for a followup patch, as doing so is not trivial (as it requires specialization) and not _obviously_ better (as it requires using `wrapping_offset` rather than `offset` more). <details><summary>Basically said optimization</summary> Specialize on `T: Sized`: ```rust fn as_ptr(&self) -> *const T { if [ T is Sized ] || !is_dangling(ptr) { (ptr as *mut T).set_ptr_value( (ptr as *mut u8).wrapping_offset(data_offset) ) } else { ptr::null() } } fn from_raw(*const T) -> Self { if [ T is Sized ] || !ptr.is_null() { let ptr = (ptr as *mut RcBox).set_ptr_value( (ptr as *mut u8).wrapping_offset(-data_offset) ); Weak { ptr } } else { Weak::new() } } ``` (but with more `set_ptr_value` to avoid `Sized` restrictions and maintain metadata.) Written in this fashion, this is not a correctness-critical specialization (i.e. so long as `[ T is Sized ]` is false for unsized `T`, it can be `rand()` for sized `T` without breaking correctness), but it's still touchy, so I'd rather do it in another PR with separate review. --- </details> This effectively reverts rust-lang#80422 and re-establishes rust-lang#74160. T-libs [previously signed off](rust-lang#74160 (comment)) on this stable API change in rust-lang#74160.
…crum Make `x.py --color always` apply to logging too Follow-up to rust-lang#78548, rust-lang#79004. r? ```@Mark-Simulacrum```
…acrum Add a regression test for rust-lang#76281 This has been fixed between 1.47.0-nightly (663d2f5 2020-08-22) and 1.47.0-nightly (5180f3d 2020-08-23). Maybe fixed by rust-lang#73526? Created `wasm` dir, it currently has only one test but I'll move some wasm-related tests there as a follow-up. Closes rust-lang#76281
…arkor Do not suggest invalid code in pattern with loop Fixes rust-lang#80913
…Simulacrum Stabilize the poll_map feature Stabilizes the `poll_map` feature as tracked by rust-lang#63514 (with a completed FCP).
…nization, r=Mark-Simulacrum Put all feature gate tests under `feature-gates/` There was one directory that had only a single test and there was also a test in the top-level directory. This moves both of them to `feature-gates/`.
…r=jyn514 Remove doctree::Import Per the title. Part of cleaning up doctree
doctest: Reset errors before dropping the parse session The first parse is to collect whether the code contains macros, has `main`, and uses other crates. In that pass we ignore errors as those will be reported when the test file is actually built. For that we need to reset errors in the `Diagnostic` otherwise when dropping it unhandled errors will be reported as compiler bugs. Fixes rust-lang#80992
…ark-Simulacrum Add a regression test for rust-lang#50041 AFAICT the test case never landed alongside the fix for the issue.
…=jyn514 codegen_cranelift: Fix redundant semicolon warn
…Simulacrum Add sample code for Rc::new_cyclic
…imulacrum Add test for rust-lang#34792 Closes rust-lang#34792
@bors r+ p=17 rollup=never |
📌 Commit a6b2e1f 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
Jan 16, 2021
☀️ Test successful - checks-actions |
This was referenced Jan 16, 2021
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:
x.py --color always
apply to logging too #80901 (Makex.py --color always
apply to logging too)feature-gates/
#80971 (Put all feature gate tests underfeature-gates/
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup