Skip to content

Reference autocompletion inserts & in wrong place in macros #13035

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

Closed
flodiebold opened this issue Aug 16, 2022 · 1 comment · Fixed by #13092
Closed

Reference autocompletion inserts & in wrong place in macros #13035

flodiebold opened this issue Aug 16, 2022 · 1 comment · Fixed by #13092
Labels
A-completion autocompletion A-macro macro expansion C-bug Category: bug

Comments

@flodiebold
Copy link
Member

I could have sworn we have a ticket for this, but I couldn't find it.

// some extra text

enum Foo { Bar }

fn foo(foo: &Foo) {}

fn test() {
    println!("{}", foo(Foo::Ba<|>))
}

using the &Bar completion here inserts the ampersand in the wrong place.

@flodiebold flodiebold added A-completion autocompletion A-macro macro expansion C-bug Category: bug labels Aug 16, 2022
@Veykril
Copy link
Member

Veykril commented Aug 16, 2022

We had one for attributes, I'd expect us to not even offer these in macros currently

bors added a commit that referenced this issue Aug 23, 2022
fix: Fix reference autocompletions using incorrect offsets in macro inputs

Fixes #13035
@bors bors closed this as completed in 6c5d158 Aug 23, 2022
Veykril added a commit to Veykril/rust-analyzer that referenced this issue Aug 31, 2022
pocket7878 pushed a commit to pocket7878/rust-analyzer that referenced this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion A-macro macro expansion C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants