Recently, I forgot declaring
edition = "2018" in Cargo.toml and try to write
use crate_name in the code. The error message was:
error[E0433]: failed to resolve: maybe a missing crate `crate_name`? --> src/main.rs:1:5 | 1 | use crate_name; | ^^^^^^^^^^ maybe a missing crate `crate_name`?
This error message confused me for hours. I only find out how to fix it by remembering "edition".
The compiler should add the following hints:
hint: Try setting edition to 2018 hint: Try adding `extern crate crate_name` for 2015 edition