Uh oh!
There was an error while loading. Please reload this page.
Suggest returning closure as impl Fn - #101019
Merged
bors merged 2 commits intoAug 30, 2022
Merged
Conversation
rust-highfive
commented
Aug 26, 2022
Contributor
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
| p!(")"); | ||
| if !sig.output().is_unit() { | ||
| p!(" -> ", print(sig.output())); |
Contributor
There was a problem hiding this comment.
What happens if one of the printed types is an APIT?
ContributorAuthor
There was a problem hiding this comment.
I don't think APITs are is_suggestable. I can try tho
ContributorAuthor
There was a problem hiding this comment.
Confirmed that this falls back to the old suggestion and doesn't suggest something like -> Fn() -> impl Fn() or anything like that. Added test for it.
cjgillot
commented
Aug 29, 2022
Contributor
@bors r+ |
bors
commented
Aug 29, 2022
Collaborator
matthiaskrgr added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 30, 2022
…gestion, r=cjgillot Suggest returning closure as `impl Fn` Fixesrust-lang#100936
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 30, 2022
Rollup of 9 pull requests Successful merges: - rust-lang#95376 (Add `vec::Drain{,Filter}::keep_rest`) - rust-lang#100092 (Fall back when relating two opaques by substs in MIR typeck) - rust-lang#101019 (Suggest returning closure as `impl Fn`) - rust-lang#101022 (Erase late bound regions before comparing types in `suggest_dereferences`) - rust-lang#101101 (interpret: make read-pointer-as-bytes a CTFE-only error with extra information) - rust-lang#101123 (Remove `register_attr` feature) - rust-lang#101175 (Don't --bless in pre-push hook) - rust-lang#101176 (rustdoc: remove unused CSS selectors for `.table-display`) - rust-lang#101180 (Add another MaybeUninit array test with const) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes#100936