rust could suggest "use" if it finds something like "import ... crate::" #97788
Closed
Description
opened on Jun 6, 2022
Given the following code:
mod a;
import crate::a::*;
fn main() {
a();
println!("Hello, world!");
}
The current output is:
error: expected one of `!` or `::`, found keyword `crate`
--> src/main.rs:2:8
|
2 | import crate::a::*;
| ^^^^^ expected one of `!` or `::`
Ideally the output should look like:
found keyword `import` did you instead intend to use `use` instead?
Activity