I’m in the process of creating something that follows this path structure:
├── src
│ ├── error
│ │ └── mod.rs
│ ├── init
│ │ └── mod.rs
│ ├── lexer
│ │ └── mod.rs
│ └── main.rs
This would be expanded gradually but as of right now, I get an error when I try to cargo run
it.
error[E0432]: unresolved import `crate::lexer`
--> src/init/mod.rs:1:12
|
1 | use crate::lexer::Lexer;
| ^^^^^ could not find `lexer` in the crate root
Likewise on the error message, I wrote that on init.rs
and it didn’t work.
I tried using mod lexer
instead but that also failed terribly.
I have no idea what to do and the interest for my little project is slowly being faded away into nothingness as I yet have to find solutions for my problem.