Description
I have attached a minimal example that reproduces the issue. It consists of two projects, where the "binarylib3" one uses the rlib directly. It builds successfully and can call functions defined in the rlib without any problems except that autocompletion doesn't work. The provided example project also serves as an attempt to wrap the library into something that plays nicely with Cargo that's easy to add as a dependency to other projects without the consumer of the library having to add anything to their build.rs file. The project "binarylib3consumer" also builds successfully and can call functions defined in the rlib, reexported by "binarylib3", with no problems other than autocompletion not working.
I am well aware of the challenges that come with such usage of rlib libraries, but keep in mind that they pose no issue to some companies and individuals that find standardizing on a compiler version within the organization to be acceptable.
rustc --version
rustc 1.66.0-nightly (9062b780b 2022-09-21)
rust-analyzer --version
rust-analyzer f1d7f98 2021-09-21 dev