disallowed_methods
false positive instant::Instant
vs std::time::Instant
#10406
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I want to forbid
std::time::Instant::now
, because it doesn't work on web/wasm:Instead I want to use https://crates.io/crates/instant
However, when I use
instant::Instant::now
I get a false-positive error.Lint Name
disallowed_methods
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: No warning
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: