Closed
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;
| ^^^^^^^^^^^^^^^^^^^