Open wiiznokes opened 1 month ago
I can take a look at this. @rustbot claim
Start with this
// main.rs
use lsp_test::foo;
fn main() {
println!("{:}", foo());
}
// lib.rs
pub fn foo() -> u32 {
44
}
pub mod foo {
pub fn bar() -> u32 {
88
}
}
Compiles and works fine.
Call bar
in main.
// main.rs
use lsp_test::foo::{self, bar}; // auto imported
fn main() {
println!("{:} {:}", foo(), bar());
}
// expected function, found module
foo
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
0.3.2146-standalone
rustc version: (eg. output of
rustc -V
)rustc 1.84.0-nightly (3ed6e3cc6 2024-10-17)
editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
VSCode
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)code snippet to reproduce:
This code is from libcosmic.
My current import is:
When I import stmg from libcosmic, let's say mouse_arena, this is what imported:
Notice the
tooltip::{self, Position}
. This cause this error:error[E0423]: expected function, found module
tooltip``