Hi I'm pretty new to rust and I dont relly know how the module system works. I'm setting up a libray so my file structure looks like this,
src
lib.rs
iron_torch.rs
matrix.rs
but when i do this in iron_torch.rs mod matrix; i get this error: error[E0583]: file not found for module matrix
--> src\iron_torch.rs:1:1
|
1 | mod matrix;
| ^^^^^^^^^^^
|
= help: to create the module matrix, create file "src\iron_torch\matrix.rs" or "
src\iron_torch\matrix\mod.rs". but in lib.rs i have this pub mod iron_torch and that works complety fine. Any help is apreciated. Thx in advance!
#Modules working weirdly
4 messages · Page 1 of 1 (latest)