-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
Description
use std::fs;
use std::fs;
This code generates a confusing suggestion. The compiler should instead suggest removing one of use
s, or at least hide the help.
error[E0252]: the name `fs` is defined multiple times
--> src/main.rs:2:5
|
1 | use std::fs;
| ------- previous import of the module `fs` here
2 | use std::fs;
| ^^^^^^^ `fs` reimported here
|
= note: `fs` must be defined only once in the type namespace of this module
help: You can use `as` to change the binding name of the import
|
2 | use std::fs as other_fs;
| ^^^^^^^^^^^^^^^^^^^
Innectic
Metadata
Metadata
Assignees
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`