Closed as not planned
Description
Description
clippy_utils::path_to_local()
currently accepts a Path expression and returns the canonical HirId of the local, example below:
let x: u32 = 40;
The Path expression for the variable x
inside the Let statement will resolve correctly, however the variable b
in the example below returns None
when passed to the function, because the Path
expression is wrapped inside a Cast
expression.
let a: i32 = 10;
let b = a as u32;
Version
rustc 1.87.0-nightly (00f245915 2025-02-26)
binary: rustc
commit-hash: 00f245915b0c7839d42c26f9628220c4f1b93bf6
commit-date: 2025-02-26
host: aarch64-apple-darwin
release: 1.87.0-nightly
LLVM version: 20.1.0
Metadata
Metadata
Assignees
Labels
No labels