Skip to content

Conversation

@unexge
Copy link
Contributor

@unexge unexge commented Aug 26, 2021

Fixes #9904

@Veykril
Copy link
Member

Veykril commented Aug 27, 2021

Hmm, so this is actuall tricky. I see the problem now, when requesting completions for foo!$0($0 being the cursor), we insert our dummy token after the bang. Our infra technically handles this completion as something completely different from the foo! call since foo! itself is not a mere ident.

So your fix here might work for this specific case but its actually not really correct. I'm not quite sure what we can do here either though 🤔

@matklad
Copy link
Contributor

matklad commented Aug 30, 2021

Seems to be a tough nut to crack! I'd expect us to

  • add is_immediately_after_macro_bang condition to completion context
  • handle this as a special case in the renderer

@unexge
Copy link
Contributor Author

unexge commented Sep 1, 2021

Updated according to reviews

@Veykril
Copy link
Member

Veykril commented Sep 15, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 15, 2021

@bors bors bot merged commit 911659a into rust-lang:master Sep 15, 2021
@unexge unexge deleted the correctly-complete-macro-call-if-cursor-at-bang-token branch September 16, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double completion of macros when they are typed completely

3 participants