Trouble with 2018 mod system

Hi I have a project I am having trouble moving the mod system from 2015 rust to 2018.

The 2015 code simplified has a structure like

 --- elements
        ......... contained lines like

pub mod element1; 
pub mod element2;
pub mod element3;

In I had

pub mod elements;

The guide seems to indicate is no longer needed
but the build returns

 file not found for module `elements`                                                                                                                                       
  --> src/                                                                                                                                                                    
25 | pub mod elements;         

How can I declare multiple files under a subdirectory as modules ?


If the module is not inline, you still need an intermediary file somewhere. It doesn’t have to to be src/elements/, you can have it in src/ instead.

The file is still needed. The file name doesn’t need to be any more.

Ah OK. My silly.