Skip to content

Plain wrong std_instead_of_core suggestion #9239

Closed
@c410-f3r

Description

@c410-f3r

Summary

std_instead_of_core thinks that std::env is referring the core::env macro but the snippet is in fact referring the std-only std::env module.

Lint Name

std_instead_of_core

Reproducer

#![forbid(clippy::std_instead_of_core)]

use std::env;

fn main() {
    let _ = env::var("FOO");
}

Version

rustc 1.62.1 (e092d0b6b 2022-07-16)

Additional Labels

No response

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 have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions