Skip to content

Plain wrong std_instead_of_core suggestion #9239

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
c410-f3r opened this issue Jul 24, 2022 · 0 comments · Fixed by #9243
Closed

Plain wrong std_instead_of_core suggestion #9239

c410-f3r opened this issue Jul 24, 2022 · 0 comments · Fixed by #9243
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have

Comments

@c410-f3r
Copy link
Contributor

c410-f3r commented Jul 24, 2022

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

@c410-f3r c410-f3r added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Jul 24, 2022
@bors bors closed this as completed in c76db5c Jul 25, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant