rust-lang / rust-lang/rust-analyzer

Warning: ran out of fuel while searching for a path for item

Open
#22,636 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Given the following Cargo.toml:

[package]
name = "fuelwarn"
version = "0.1.0"
edition = "2024"

[dependencies]
sha2 = "=0.10.9"
digest = "=0.10.7"
aes-gcm = "=0.10.3"
rsa = "=0.9.10"
ed25519-dalek = "=2.2.0"
opaque-ke = "=4.1.0-pre.2"

and the following program:

use sha2::Digest;
use sha2::Sha256;

pub fn g() {
    let result = Sha256::digest(b"");
    let _ = result;
}

rust-analyzer produces a lot of warnings about fuel from searching for paths:

$ RUST_LOG=warn rust-analyzer scip .
...
2026-06-24T18:06:52.317228+01:00  WARN ran out of fuel while searching for a path for item Types(ModuleId(ModuleIdLt { [salsa id]: Id(1f9bc) })) of krate Some(Crate(Id(481e))) from krate Crate(Id(4859))
2026-06-24T18:06:52.317254+01:00  WARN ran out of fuel while searching for a path for item Types(ModuleId(ModuleIdLt { [salsa id]: Id(1f488) })) of krate Some(Crate(Id(4823))) from krate Crate(Id(4859))
2026-06-24T18:06:52.317259+01:00  WARN ran out of fuel while searching for a path for item Types(ModuleId(ModuleIdLt { [salsa id]: Id(1f9bc) })) of krate Some(Crate(Id(481e))) from krate Crate(Id(4859))
2026-06-24T18:06:52.317262+01:00  WARN ran out of fuel while searching for a path for item Types(ModuleId(ModuleIdLt { [salsa id]: Id(1f488) })) of krate Some(Crate(Id(4823))) from krate Crate(Id(4859))
...

I think this is a bug? I'll try to minimise further, but I wanted to file an initial task.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the provided Cargo.toml and Rust program, then run RUST_LOG=warn rust-analyzer scip . to observe the fuel warnings. Investigate the path-search behavior involved in the SCIP entry point and establish whether the warnings are expected; done means the behavior is understood and the reported unexpected warnings are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.