-
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 17 pull requests #81085
Closed
Closed
Rollup of 17 pull requests #81085
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
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.
Add `as_rchunks` (and friends) to slices `@est31` mentioned (rust-lang#76354 (comment)) that, for completeness, there needed to be an `as_chunks`-like method that chunks from the end (with the remainder at the beginning) like `rchunks` does. So here's a PR for `as_rchunks: &[T] -> (&[T], &[[T; N]])` and `as_rchunks_mut: &mut [T] -> (&mut [T], &mut [[T; N]])`. But as I was doing this and copy-pasting `from_raw_parts` calls, I thought that I should extract that into an unsafe method. It started out a private helper, but it seemed like `as_chunks_unchecked` could be reasonable as a "real" method, so I added docs and made it public. Let me know if you think it doesn't pull its weight.
…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.
…-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 |
📌 Commit ce803a1 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
Uh, @bors rollup=never |
⌛ Testing commit ce803a1 with merge 0487d5bfd406c0fd728387ab7dcad7b48b5cc62f... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Jan 16, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
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:
as_rchunks
(and friends) to slices #78818 (Addas_rchunks
(and friends) to slices)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