Skip to content
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

Auto-completion while typing fails after trivial attribute macro expansion #18975

Open
harrisonmg opened this issue Jan 19, 2025 · 0 comments · May be fixed by #18977
Open

Auto-completion while typing fails after trivial attribute macro expansion #18975

harrisonmg opened this issue Jan 19, 2025 · 0 comments · May be fixed by #18977
Assignees
Labels
C-bug Category: bug

Comments

@harrisonmg
Copy link

As an MRE, I have created a trivial attribute macro that merely returns the unmodified input TokenStream:

#[proc_macro_attribute]
pub fn trivial(_args: TokenStream, input: TokenStream) -> TokenStream {
    input
}

If I use this macro on trait impl, I can manually trigger completion with a keyboard shortcut, and that works:

Image

If I start to type, however, completion stops working (at least, for the functions in the trait:

Image

Where I would expect it to continue narrowing down the suggestions:

Image

rust-analyzer version: rust-analyzer 0.3.2264-standalone

rustc version: rustc 1.84.0 (9fc6b4312 2025-01-07)

editor or extension: neovim v0.10.3

relevant settings:

{
  completion = {
    callable = {
      snippets = 'add_parentheses'
    }
  },
  diagnostics = {
    disabled = { 'unlinked-file' }
  },
}
@harrisonmg harrisonmg added the C-bug Category: bug label Jan 19, 2025
@ChayimFriedman2 ChayimFriedman2 self-assigned this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants