Skip to content

std_instead_of_core emitted for unstable/feature gated types #17407

Description

@sww1235

Summary

Just updated to 1.97 using cargo, and the std_instead_of_core lint was emitted when it hadn't been in the past.

This looks like a regression of the fixes for #9545.

Lint Name

std_instead_of_core

Reproducer

I tried this code:

use std::io::ErrorKind;

I saw this happen:

[<output>](warning: used import from `std` instead of `core`)

I expected to see this happen:

No output, since core::io::ErrorKind is not stable yet.

Version

rustc 1.97.0 (2d8144b78 2026-07-07)
binary: rustc
commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3
commit-date: 2026-07-07
host: x86_64-unknown-linux-gnu
release: 1.97.0
LLVM version: 22.1.6

Additional Labels

@rustbot label +I-suggestion-causes-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when applied

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions