-
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 5 pull requests #103755
Rollup of 5 pull requests #103755
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 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for be61f02 - Browse repository at this point
Copy the full SHA be61f02View commit details -
Add check to only output 'you might have meant' when the candidate na…
…me is in the same crate
Configuration menu - View commit details
-
Copy full SHA for 0b936d2 - Browse repository at this point
Copy the full SHA 0b936d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 775328c - Browse repository at this point
Copy the full SHA 775328cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0eaf6d5 - Browse repository at this point
Copy the full SHA 0eaf6d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for ddba6c1 - Browse repository at this point
Copy the full SHA ddba6c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06692ea - Browse repository at this point
Copy the full SHA 06692eaView commit details
Commits on Oct 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 17b86cb - Browse repository at this point
Copy the full SHA 17b86cbView commit details
Commits on Oct 29, 2022
-
rustdoc: remove unnecessary
.search-results { padding-bottom }
There's nothing underneath it anyway. The conversation on b615c0c never really spelled out why it was added.
Configuration menu - View commit details
-
Copy full SHA for a3c56e0 - Browse repository at this point
Copy the full SHA a3c56e0View commit details
Commits on Oct 30, 2022
-
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 b4cf523 - Browse repository at this point
Copy the full SHA b4cf523View commit details -
Rollup merge of rust-lang#103560 - zbyrn:issue-103358-fix, r=cjgillot
Point only to the identifiers in the typo suggestions of shadowed names instead of the entire struct Fixes rust-lang#103358. As discussed in the issue, the `Span` of the candidate `Ident` for a typo replacement is stored alongside its `Symbol` in `TypoSuggestion`. Then, the span of the identifier is what the "you might have meant to refer to" note is pointed at, rather than the entire struct definition. Comments in rust-lang#103111 and the issue both suggest that it is desirable to: 1. include names defined in the same crate as the typo, 2. ignore names defined elsewhere such as in `std`, _and_ 3. include names introduced indirectly via `use`. Since a name from another crate but introduced via `use` has non-local `def_id`, to achieve this, a suggestion is displayed if either the `def_id` of the suggested name is local, or the `span` of the suggested name is in the same file as the typo itself. Some UI tests have also been modified to reflect this change. r? `@cjgillot`
Configuration menu - View commit details
-
Copy full SHA for 3143472 - Browse repository at this point
Copy the full SHA 3143472View commit details -
Rollup merge of rust-lang#103588 - weihanglo:rustdoc/url-redirect, r=…
…notriddle rustdoc: add missing URL redirect rust-lang#94753 missed some redirect settings, and one of the missing URL shows up in an error message. This PR adds those redirects.
Configuration menu - View commit details
-
Copy full SHA for 8564ee8 - Browse repository at this point
Copy the full SHA 8564ee8View commit details -
Rollup merge of rust-lang#103689 - saethlin:libtest-startup, r=thomcc
Do fewer passes and generally be more efficient when filtering tests Follow-on of the work I started with this PR: rust-lang#99939 Basically, the startup code for libtest is really inefficient, but that's not usually a problem because it is distributed in release and workloads are small. But under Miri which can be 100x slower than a debug build, these inefficiencies explode. Most of the diff here is making test filtering single-pass. There are a few other small optimizations as well, but they are more straightforward. With this PR, the startup time of the `iced` tests with `--features=code_asm,mvex` drops from 17 to 2 minutes (I think Miri has gotten slower under this workload since rust-lang#99939). The easiest way to try this out is to set `MIRI_LIB_SRC` to a checkout of this branch when running `cargo +nightly miri test --features=code_asm,mvex`. r? `@thomcc`
Configuration menu - View commit details
-
Copy full SHA for 176a89f - Browse repository at this point
Copy the full SHA 176a89fView commit details -
Rollup merge of rust-lang#103740 - notriddle:notriddle/search-results…
…-padding-bottom, r=Dylan-DPC rustdoc: remove unnecessary CSS `.search-results { padding-bottom }` There's nothing underneath it anyway. The conversation on rust-lang#84462 never really spelled out why it was added.
Configuration menu - View commit details
-
Copy full SHA for df74f07 - Browse repository at this point
Copy the full SHA df74f07View commit details