]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/std_instead_of_core.txt
Auto merge of #104673 - matthiaskrgr:rollup-85f65ov, r=matthiaskrgr
[rust.git] / src / tools / clippy / src / docs / std_instead_of_core.txt
1 ### What it does
2
3 Finds items imported through `std` when available through `core`.
4
5 ### Why is this bad?
6
7 Crates which have `no_std` compatibility may wish to ensure types are imported from core to ensure
8 disabling `std` does not cause the crate to fail to compile. This lint is also useful for crates
9 migrating to become `no_std` compatible.
10
11 ### Example
12 ```
13 use std::hash::Hasher;
14 ```
15 Use instead:
16 ```
17 use core::hash::Hasher;
18 ```