When compiling dev-lang/rust with the USE-flag "rust-analyzer" rust-analyzer doesn't actually work unless you also use the flag "rust-src". Easy to test with blank new project, run "rust-analyzer analysis-stats /path/to/project" and it'll spit out errors saying it can't find the rust source code. Add the rust-src flag and the error goes away.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b2edc9b4f22eff3d683fe4af9feea2bb74d9834 commit 0b2edc9b4f22eff3d683fe4af9feea2bb74d9834 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2023-06-07 21:59:34 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2023-06-07 22:02:36 +0000 dev-lang/rust: require src component for rust-analyzer Closes: https://bugs.gentoo.org/907961 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust/rust-1.65.0.ebuild | 2 +- dev-lang/rust/rust-1.66.1.ebuild | 1 + dev-lang/rust/rust-1.67.1.ebuild | 1 + dev-lang/rust/rust-1.68.2.ebuild | 1 + dev-lang/rust/rust-1.69.0-r1.ebuild | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=188cb565103e7fe90f03793b0f32ed6a575d5a11 commit 188cb565103e7fe90f03793b0f32ed6a575d5a11 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2023-06-07 21:55:13 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2023-06-07 22:02:35 +0000 dev-lang/rust: keyword 1.70.0 Bug: https://bugs.gentoo.org/907961 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust/rust-1.70.0.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)