RS.CLIPPY.STD_INSTEAD_OF_CORE

Type is imported from std when available in core

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: std_instead_of_core. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Finds items imported through std when available through core.

Why restrict this?

Crates which have no_std compatibility may wish to ensure types are imported from core to ensure disabling std does not cause the crate to fail to compile. This lint is also useful for crates migrating to become no_std compatible.

Example

use std::hash::Hasher;

Use instead:

use core::hash::Hasher;