-
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 6 pull requests #103685
Rollup of 6 pull requests #103685
Commits on Oct 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 328f817 - Browse repository at this point
Copy the full SHA 328f817View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36dbb07 - Browse repository at this point
Copy the full SHA 36dbb07View commit details
Commits on Oct 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4accf83 - Browse repository at this point
Copy the full SHA 4accf83View commit details
Commits on Oct 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8b984e5 - Browse repository at this point
Copy the full SHA 8b984e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e521a8d - Browse repository at this point
Copy the full SHA e521a8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 86c65d2 - Browse repository at this point
Copy the full SHA 86c65d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for daf3063 - Browse repository at this point
Copy the full SHA daf3063View commit details -
Co-authored-by: Amanieu d'Antras <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 979d1a2 - Browse repository at this point
Copy the full SHA 979d1a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e6d60c - Browse repository at this point
Copy the full SHA 4e6d60cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9cca33 - Browse repository at this point
Copy the full SHA c9cca33View commit details
Commits on Oct 25, 2022
-
Allow
impl Fn() -> impl Trait
in return positionThis allows writing the following function signatures: ```rust fn f0() -> impl Fn() -> impl Trait; fn f3() -> &'static dyn Fn() -> impl Trait; ``` These signatures were already allowed for common traits and associated types, there is no reason why `Fn*` traits should be special in this regard.
Configuration menu - View commit details
-
Copy full SHA for 8b494f4 - Browse repository at this point
Copy the full SHA 8b494f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a4ba2f - Browse repository at this point
Copy the full SHA 7a4ba2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00f2277 - Browse repository at this point
Copy the full SHA 00f2277View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc752f5 - Browse repository at this point
Copy the full SHA cc752f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d116859 - Browse repository at this point
Copy the full SHA d116859View commit details -
Configuration menu - View commit details
-
Copy full SHA for 690e037 - Browse repository at this point
Copy the full SHA 690e037View commit details -
Configuration menu - View commit details
-
Copy full SHA for e93982a - Browse repository at this point
Copy the full SHA e93982aView commit details
Commits on Oct 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bfac2da - Browse repository at this point
Copy the full SHA bfac2daView commit details
Commits on Oct 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 92b314b - Browse repository at this point
Copy the full SHA 92b314bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b3f9277 - Browse repository at this point
Copy the full SHA b3f9277View commit details -
Rollup merge of rust-lang#93582 - WaffleLapkin:rpitirpit, r=compiler-…
…errors Allow `impl Fn() -> impl Trait` in return position _This was originally proposed as part of rust-lang#93082 which was [closed](rust-lang#93082 (comment)) due to allowing `impl Fn() -> impl Trait` in argument position._ This allows writing the following function signatures: ```rust fn f0() -> impl Fn() -> impl Trait; fn f3() -> &'static dyn Fn() -> impl Trait; ``` These signatures were already allowed for common traits and associated types, there is no reason why `Fn*` traits should be special in this regard. `impl Trait` in both `f0` and `f3` means "new existential type", just like with `-> impl Iterator<Item = impl Trait>` and such. Arrow in `impl Fn() ->` is right-associative and binds from right to left, it's tested by [this test](https://github.com/WaffleLapkin/rust/blob/a819fecb8dea438fc70488ddec30a61e52942672/src/test/ui/impl-trait/impl_fn_associativity.rs). There even is a test that `f0` compiles: https://github.com/rust-lang/rust/blob/2f004d2d401682e553af3984ebd9a3976885e752/src/test/ui/impl-trait/nested_impl_trait.rs#L25-L28 But it was changed in [PR 48084 (lines)](https://github.com/rust-lang/rust/pull/48084/files#diff-ccecca938872d65ffe8cd1c3ef1956e309fac83bcda547d8b16b89257e53a437R37) to test the opposite, probably unintentionally given [PR 48084 (lines)](https://github.com/rust-lang/rust/pull/48084/files#diff-5a02f1ed43debed1fd24f7aad72490064f795b9420f15d847bac822aa4621a1cR476-R477). r? `@nikomatsakis` ---- This limitation is especially annoying with async code, since it forces one to write this: ```rust trait AsyncFn3<A, B, C>: Fn(A, B, C) -> <Self as AsyncFn3<A, B, C>>::Future { type Future: Future<Output = Self::Out>; type Out; } impl<A, B, C, Fut, F> AsyncFn3<A, B, C> for F where F: Fn(A, B, C) -> Fut, Fut: Future, { type Future = Fut; type Out = Fut::Output; } fn async_closure() -> impl AsyncFn3<i32, i32, i32, Out = u32> { |a, b, c| async move { (a + b + c) as u32 } } ``` Instead of: ```rust fn async_closure() -> impl Fn(i32, i32, i32) -> impl Future<Output = u32> { |a, b, c| async move { (a + b + c) as u32 } } ```
Configuration menu - View commit details
-
Copy full SHA for 38abbcf - Browse repository at this point
Copy the full SHA 38abbcfView commit details -
Rollup merge of rust-lang#100452 - ouz-a:issue-93242, r=jackh726
Fake capture closures if typeck results are empty This ICE happens because `closure_min_captures` is empty, the reason it's empty is with the 2021 edition `enable_precise_capture` is set to true, which makes it so that we can't fake capture any information because that result of the `unwrap` is none hence the ICE. Other solution is editing [maybe_read_scrutinee](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/expr_use_visitor.rs.html#453-463) to this since empty slice contains no sub patterns. Fixes rust-lang#93242 ```rust PatKind::Slice(_, ref slice, _) => { if slice.is_none(){ need_to_be_read = true; } } // instead of PatKind::Or(_) | PatKind::Box(_) | PatKind::Slice(..) | PatKind::Ref(..) | PatKind::Wild => {} ```
Configuration menu - View commit details
-
Copy full SHA for eb6cd05 - Browse repository at this point
Copy the full SHA eb6cd05View commit details -
Rollup merge of rust-lang#102721 - nbdd0121:panic, r=Amanieu
Prevent foreign Rust exceptions from being caught Fix rust-lang#102715 Use the address of a static variable (which is guaranteed to be unique per copy of std) to tell apart if a Rust exception comes from local or foreign Rust code, and abort for the latter.
Configuration menu - View commit details
-
Copy full SHA for 28ece5a - Browse repository at this point
Copy the full SHA 28ece5aView commit details -
Rollup merge of rust-lang#102961 - reitermarkus:const-cstr-from-ptr, …
…r=oli-obk Make `CStr::from_ptr` `const`. Should be included in rust-lang#101719. cc `@WaffleLapkin`
Configuration menu - View commit details
-
Copy full SHA for 6db281a - Browse repository at this point
Copy the full SHA 6db281aView commit details -
Rollup merge of rust-lang#103342 - Rageking8:add-test-for-issue-98634…
…, r=compiler-errors Add test for issue 98634 Fixes rust-lang#98634
Configuration menu - View commit details
-
Copy full SHA for ccc10a4 - Browse repository at this point
Copy the full SHA ccc10a4View commit details -
Rollup merge of rust-lang#103383 - compiler-errors:tait-scope, r=oli-obk
Note scope of TAIT more accurately This maybe explains why the person was confused in rust-lang#101897, since we say "same module" but really should've said "same impl". r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for e7fb356 - Browse repository at this point
Copy the full SHA e7fb356View commit details