Skip to content

Find usages doesn't work well inside the file that included by include! macro #18313

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
ShoyuVanilla opened this issue Oct 17, 2024 · 1 comment · Fixed by #18361
Closed

Find usages doesn't work well inside the file that included by include! macro #18313

ShoyuVanilla opened this issue Oct 17, 2024 · 1 comment · Fixed by #18361
Assignees
Labels
A-nameres name, path and module resolution C-bug Category: bug

Comments

@ShoyuVanilla
Copy link
Member

// ./src/lib.rs
include!("foo.rs");

fn howdy() {
    let _ = FIND_ME;
         // ^^^^^^^ triggering find usages here works fine
    println!("{FIND_ME}");
            // ^^^^^^^ fine here, too
}

// ./src/foo.rs
const FIND_ME: i32 = 0;
   // ^^^^^^^ not finding any usages here
@ShoyuVanilla ShoyuVanilla added the C-bug Category: bug label Oct 17, 2024
@ShoyuVanilla ShoyuVanilla changed the title Find usages doesn't work well inside the file that included by included! macro Find usages doesn't work well inside the file that included by include! macro Oct 17, 2024
@ShoyuVanilla ShoyuVanilla self-assigned this Oct 17, 2024
@ShoyuVanilla
Copy link
Member Author

I'm currently working on a project that has many included! macro and seeing quite many bugs.
I'm gonna fix them for my own QoL 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-nameres name, path and module resolution C-bug Category: bug
Projects
None yet
1 participant