completions: Add rudimentary support for closure completions#21683
Open
osiewicz wants to merge 6 commits intorust-lang:masterfrom
Open
completions: Add rudimentary support for closure completions#21683osiewicz wants to merge 6 commits intorust-lang:masterfrom
osiewicz wants to merge 6 commits intorust-lang:masterfrom
Conversation
482555b to
815a349
Compare
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
4d5c11c to
1a36b43
Compare
parameter Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
A4-Tacks
reviewed
Feb 20, 2026
| r#" | ||
| fn foo<T>(f: impl Fn(T) -> T) {} | ||
| fn main() { | ||
| foo(|${1:_}: ${2:T}| $0); |
Member
There was a problem hiding this comment.
Don't you consider using NameGenerator to generate parameters?
Just like a |x0, x1, items|
Contributor
Author
There was a problem hiding this comment.
I guess we could do that, yes.
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 free
to 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.
Related to #8676
Related to #9444
CleanShot.2026-02-20.at.11.35.29.mp4
Closure parameter names are a bit wacky, but they've been that way even before this PR; we should probably filter out suggestions for patterns that cannot actually be destructured.