-
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
Rollup of 17 pull requests #81089
Commits on Dec 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 4f4f7f2 - Browse repository at this point
Copy the full SHA 4f4f7f2View commit details
Commits on Dec 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d2cc79e - Browse repository at this point
Copy the full SHA d2cc79eView commit details
Commits on Jan 4, 2021
-
TrustedRandomAaccess spec composes incorrectly for nested iter::Zips
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.
Configuration menu - View commit details
-
Copy full SHA for af2983a - Browse repository at this point
Copy the full SHA af2983aView commit details
Commits on Jan 7, 2021
-
Re-stabilize Weak::as_ptr &friends for unsized T
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).
Configuration menu - View commit details
-
Copy full SHA for 6bc772c - Browse repository at this point
Copy the full SHA 6bc772cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f00b458 - Browse repository at this point
Copy the full SHA f00b458View commit details -
Configuration menu - View commit details
-
Copy full SHA for b10b9e2 - Browse repository at this point
Copy the full SHA b10b9e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e578c9 - Browse repository at this point
Copy the full SHA 1e578c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4901c55 - Browse repository at this point
Copy the full SHA 4901c55View commit details
Commits on Jan 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 747dbcb - Browse repository at this point
Copy the full SHA 747dbcbView commit details
Commits on Jan 10, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5ccef56 - Browse repository at this point
Copy the full SHA 5ccef56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12f1795 - Browse repository at this point
Copy the full SHA 12f1795View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b9c8ff - Browse repository at this point
Copy the full SHA 2b9c8ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e345a5 - Browse repository at this point
Copy the full SHA 9e345a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 757bd23 - Browse repository at this point
Copy the full SHA 757bd23View commit details
Commits on Jan 11, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b5b6760 - Browse repository at this point
Copy the full SHA b5b6760View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04b6036 - Browse repository at this point
Copy the full SHA 04b6036View commit details
Commits on Jan 12, 2021
-
Update src/test/ui/async-await/issues/issue-78938-async-block.stderr
Co-authored-by: Esteban Kuber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3ee3071 - Browse repository at this point
Copy the full SHA 3ee3071View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4362da1 - Browse repository at this point
Copy the full SHA 4362da1View commit details
Commits on Jan 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b2f5048 - Browse repository at this point
Copy the full SHA b2f5048View commit details -
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/`.
Configuration menu - View commit details
-
Copy full SHA for c200036 - Browse repository at this point
Copy the full SHA c200036View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f41465 - Browse repository at this point
Copy the full SHA 7f41465View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5c4287 - Browse repository at this point
Copy the full SHA f5c4287View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9ead34 - Browse repository at this point
Copy the full SHA a9ead34View commit details -
Apply suggestions from code review
Co-authored-by: Ralf Jung <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c14e919 - Browse repository at this point
Copy the full SHA c14e919View commit details
Commits on Jan 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 174135f - Browse repository at this point
Copy the full SHA 174135fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63deae5 - Browse repository at this point
Copy the full SHA 63deae5View commit details
Commits on Jan 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5468d98 - Browse repository at this point
Copy the full SHA 5468d98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0660b8b - Browse repository at this point
Copy the full SHA 0660b8bView commit details -
Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_error…
…s.rs Co-authored-by: Esteban Kuber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e9c95b - Browse repository at this point
Copy the full SHA 3e9c95bView commit details -
Use Result and rename to filter_map
The use of Result allows for making use of a reconstructed original value on failed projections.
Configuration menu - View commit details
-
Copy full SHA for e8757af - Browse repository at this point
Copy the full SHA e8757afView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3274fd - Browse repository at this point
Copy the full SHA e3274fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a0c9e2 - Browse repository at this point
Copy the full SHA 2a0c9e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e42c1b9 - Browse repository at this point
Copy the full SHA e42c1b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31b17f5 - Browse repository at this point
Copy the full SHA 31b17f5View commit details -
Add a regression test for rust-lang#50041
AFAICT the test case never landed alongside the fix for the issue.
Configuration menu - View commit details
-
Copy full SHA for af0d099 - Browse repository at this point
Copy the full SHA af0d099View commit details
Commits on Jan 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c625b97 - Browse repository at this point
Copy the full SHA c625b97View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for eef383f - Browse repository at this point
Copy the full SHA eef383fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ef5557 - Browse repository at this point
Copy the full SHA 0ef5557View commit details -
Configuration menu - View commit details
-
Copy full SHA for b681631 - Browse repository at this point
Copy the full SHA b681631View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8797986 - Browse repository at this point
Copy the full SHA 8797986View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9952632 - Browse repository at this point
Copy the full SHA 9952632View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78d9192 - Browse repository at this point
Copy the full SHA 78d9192View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc7ff7 - Browse repository at this point
Copy the full SHA bdc7ff7View commit details -
Rollup merge of rust-lang#78455 - udoprog:refcell-opt-map, r=KodrAus
Introduce {Ref, RefMut}::try_map for optional projections in RefCell This fills a usability gap of `RefCell` I've personally encountered to perform optional projections, mostly into collections such as `RefCell<Vec<T>>` or `RefCell<HashMap<U, T>>`: > This kind of API was briefly featured under Open questions in rust-lang#10514 back in 2013 (!) ```rust let values = RefCell::new(vec![1, 2, 3, 4]); let b = Ref::opt_map(values.borrow(), |vec| vec.get(2)); ``` It primarily avoids this alternative approach to accomplish the same kind of projection which is both rather noisy and panicky: ```rust let values = RefCell::new(vec![1, 2, 3, 4]); let b = if values.get(2).is_some() { Some(Ref::map(values.borrow(), |vec| vec.get(2).unwrap())) } else { None }; ``` ### Open questions The naming `opt_map` is preliminary. I'm not aware of prior art in std to lean on here, but this name should probably be improved if this functionality is desirable. Since `opt_map` consumes the guard, and alternative syntax might be more appropriate which instead *tries* to perform the projection, allowing the original borrow to be recovered in case it fails: ```rust pub fn try_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Result<Ref<'b, U>, Self> where F: FnOnce(&T) -> Option<&U>; ``` This would be more in line with the `try_map` method [provided by parking lot](https://docs.rs/lock_api/0/lock_api/struct.RwLockWriteGuard.html#method.try_map).
Configuration menu - View commit details
-
Copy full SHA for 6bb06f4 - Browse repository at this point
Copy the full SHA 6bb06f4View commit details -
Rollup merge of rust-lang#80144 - rust-lang:frewsxcv-patch-3, r=nikom…
…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
Configuration menu - View commit details
-
Copy full SHA for d2b63d4 - Browse repository at this point
Copy the full SHA d2b63d4View commit details -
Rollup merge of rust-lang#80614 - 1000teslas:issue-78938-fix, r=tmandry
Explain why borrows can't be held across yield point in async blocks For rust-lang#78938.
Configuration menu - View commit details
-
Copy full SHA for af5b0d9 - Browse repository at this point
Copy the full SHA af5b0d9View commit details -
Rollup merge of rust-lang#80670 - the8472:fix-zip-trusted-random-acce…
…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)
Configuration menu - View commit details
-
Copy full SHA for d8843d9 - Browse repository at this point
Copy the full SHA d8843d9View commit details -
Rollup merge of rust-lang#80681 - ChrisJefferson:logic-error-doc, r=m…
…-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
Configuration menu - View commit details
-
Copy full SHA for 40d2506 - Browse repository at this point
Copy the full SHA 40d2506View commit details -
Rollup merge of rust-lang#80764 - CAD97:weak-unsized-as-ptr-again, r=…
…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.
Configuration menu - View commit details
-
Copy full SHA for 5702cfa - Browse repository at this point
Copy the full SHA 5702cfaView commit details -
Rollup merge of rust-lang#80901 - jyn514:better-colors, r=Mark-Simula…
…crum Make `x.py --color always` apply to logging too Follow-up to rust-lang#78548, rust-lang#79004. r? ```@Mark-Simulacrum```
Configuration menu - View commit details
-
Copy full SHA for 5b5aa10 - Browse repository at this point
Copy the full SHA 5b5aa10View commit details -
Rollup merge of rust-lang#80902 - JohnTitor:issue-76281, r=Mark-Simul…
…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
Configuration menu - View commit details
-
Copy full SHA for b3aa880 - Browse repository at this point
Copy the full SHA b3aa880View commit details -
Rollup merge of rust-lang#80941 - JohnTitor:ref-mut-pat-in-loops, r=v…
…arkor Do not suggest invalid code in pattern with loop Fixes rust-lang#80913
Configuration menu - View commit details
-
Copy full SHA for 79a8499 - Browse repository at this point
Copy the full SHA 79a8499View commit details -
Rollup merge of rust-lang#80968 - KodrAus:stabilize/poll_map, r=Mark-…
…Simulacrum Stabilize the poll_map feature Stabilizes the `poll_map` feature as tracked by rust-lang#63514 (with a completed FCP).
Configuration menu - View commit details
-
Copy full SHA for dba6c9c - Browse repository at this point
Copy the full SHA dba6c9cView commit details -
Rollup merge of rust-lang#80971 - camelid:feature-gate-testsuite-orga…
…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/`.
Configuration menu - View commit details
-
Copy full SHA for 4a48651 - Browse repository at this point
Copy the full SHA 4a48651View commit details -
Rollup merge of rust-lang#81021 - CraftSpider:rustdoc-remove-import, …
…r=jyn514 Remove doctree::Import Per the title. Part of cleaning up doctree
Configuration menu - View commit details
-
Copy full SHA for 1368e81 - Browse repository at this point
Copy the full SHA 1368e81View commit details -
Rollup merge of rust-lang#81040 - osa1:fix_80992, r=jyn514
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
Configuration menu - View commit details
-
Copy full SHA for 9df8dcb - Browse repository at this point
Copy the full SHA 9df8dcbView commit details -
Rollup merge of rust-lang#81060 - nagisa:nagisa/regression-50041, r=M…
…ark-Simulacrum Add a regression test for rust-lang#50041 AFAICT the test case never landed alongside the fix for the issue.
Configuration menu - View commit details
-
Copy full SHA for b67689b - Browse repository at this point
Copy the full SHA b67689bView commit details -
Rollup merge of rust-lang#81065 - osa1:cranelift_semicolon_warning, r…
…=jyn514 codegen_cranelift: Fix redundant semicolon warn
Configuration menu - View commit details
-
Copy full SHA for 61be4e8 - Browse repository at this point
Copy the full SHA 61be4e8View commit details -
Rollup merge of rust-lang#81069 - ogoffart:rc_new_cyclic_doc, r=Mark-…
…Simulacrum Add sample code for Rc::new_cyclic
Configuration menu - View commit details
-
Copy full SHA for dd86fc6 - Browse repository at this point
Copy the full SHA dd86fc6View commit details -
Rollup merge of rust-lang#81081 - bugadani:double-partialeq, r=Mark-S…
…imulacrum Add test for rust-lang#34792 Closes rust-lang#34792
Configuration menu - View commit details
-
Copy full SHA for a6b2e1f - Browse repository at this point
Copy the full SHA a6b2e1fView commit details