-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages
Description
Description
Currently for code like
let foo = Default::default();
or
foo: Default::default(),
where foo
is a variable of type Option<usize>
suggests to replace it with Option::default()
, which is not wrong but suggesting None
would be better. Can probably be extended to some other types in stdlib.
Version
rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-unknown-linux-gnu
release: 1.70.0
LLVM version: 16.0.2
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages