-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-completionautocompletionautocompletionC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
Consider the following macro_rules macro defined in another crate:
#[macro_export]
macro_rules! define_struct {
() => {
pub struct Foo;
};
}It does not complete when it is at the "root" of a module (not sure if this is the right terminology, it's direct parent in AST is SourceFile)
defi$0
fn main() {
defi$1
}Completion works for $1, but not $0. Completion will work at $0 if there is a use some_crate::define_struct; at the top of the file.
This is somewhat a recent regression most likely, because I think this was working in the past!
rust-analyzer version: 0.0.0 (b0102bd 2022-06-28)
rustc 1.63.0-nightly (12cd71f 2022-06-01)
Metadata
Metadata
Assignees
Labels
A-completionautocompletionautocompletionC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now