Rust-analyzer showing persistent phantom diagnostics after upgrading to Rust 1.93.1 in a workspace project

Hello,

I’m encountering an issue after upgrading from Rust 1.93 to Rust 1.93.1, and I would appreciate any insight from the community.

I’m working on a Rust workspace composed of multiple sub-crates. Everything was functioning correctly with Rust 1.93 and VSCodium (VSCode). However, since upgrading to Rust 1.93.1, I’m seeing more than 50 warnings of the following type every time I open the IDE:

2026-02-14T18:56:47.153796764+01:00  WARN Ignoring package label Cargo { package_id: PackageId { repr: "path+file:///home/xxxxxxxxx/project_xxx#0.1.0" } } and applying diagnostics to the whole workspace
[...]
[...]
2026-02-14T18:56:47.153796791+01:00  WARN Ignoring package label Cargo { package_id: PackageId { repr: "path+file:///home/xxxxxxxxx/project_xxx#0.1.0" } } and applying diagnostics to the whole workspace
[...]
[...]
2026-02-14T18:56:51.863376819+01:00  WARN overly long loop turn took 139.992406ms (event handling took 139.944731ms): PrimeCaches(End { cancelled: false })
[...]
[...]

In addition, I’m experiencing persistent “ghost” errors in the source code. Even after fixing the reported issue, rust-analyzer continues to display the error. The only way to clear it is to manually restart rust-analyzer, and this needs to be done repeatedly after each modification.

So far, I have tried:

  • cargo clean
  • Removing Cargo.lock
  • Deleting the /target directory entirely

Unfortunately, none of these actions resolved the problem.

Has anyone experienced similar behavior after upgrading to Rust 1.93.1, particularly in a workspace setup? Any guidance or suggestions would be greatly appreciated.

Thank you in advance.

I am also encountering these “ghost errors” in Zed with v0.3.2786. They just don’t disappear after fixing them until I restart the language server.

I even tried reverting to the previous Rust version:
rustup override set 1.93.0

I also restarted the machine to make sure it wasn’t a stuck process, but I’m still facing the same issue.

:pensive_face:

This is a recent issue in rust-analyzer. It is not affected by the rustc version or target files.

Try updating to the latest rust-analyzer prerelease (0.4.2792 as of right now). If that doesn’t fix it, check the issue tracker. (Several issues have been filed about this and I’m not sure what the exact most relevant one is; in some cases the problem also included constant high CPU usage.)

3 Likes

Thank you very much for your help. I switched to the pre-release version of rust-analyzer, and now I only have these warnings:

2026-02-14T19:55:22.7343488+01:00  WARN overly long loop turn took 117.569431ms (event handling took 117.518917ms): PrimeCaches(End { cancelled: false })
[...]

This resolves a significant portion of the issue, which is a solid step forward.

@kpreid , do you have any insight into what might be causing the WARN overly long loop warning?

High CPU usage, I guess?

That doesn't sound like it is a significant problem. PrimeCaches is the "indexing" step that scans all crates, and it only happens once at startup (and maybe if Cargo.toml is being edited?) and so it is not a big deal if the language server is less responsive by a fraction of a second during that period.

1 Like