Completions in macros should consider the fragment type they are part of #11059
Labels
A-completion
autocompletion
A-macro
macro expansion
C-Architecture
Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )
E-unknown
It's unclear if the issue is E-hard or E-easy without digging in
S-actionable
Someone could pick this issue up and work on it right now
Typing at the cursor position gives us various completions, one of which is the
Foo { foo }: Foo
pattern completion as the identifier is used in a pattern position in the expansion. This completion is wrong though, as applying it will lead to syntax errors. In this case we need to consider that the identifier we are completing is being captures as an$ident
fragment, as such only stupid identifier completions should be allowed. OTOH if it was a$pat
fragment capture, this completion would be fine.We currently lack the ability of figuring out what kind of fragment type a token got captured by, so that needs to be done first. #11183
cc #11058
The text was updated successfully, but these errors were encountered: