mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
802 stars 44 forks source link

"No file with module definition" #17

Closed SpaceManiac closed 7 years ago

SpaceManiac commented 7 years ago

Admittedly this is an odd case, but rust-cpp can't find a file that rustc can:

pub mod foo {
    pub mod bar;
}

No foo/mod.rs exists. rustc finds foo/bar.rs and compiles it, but rust-cpp claims "No file with module definition for mod bar".

mystor commented 7 years ago

This makes sense. cpp-synstructure uses a simple algorithm to try to discover submodules but sometimes doesn't handle directories correctly apparently.

It shouldn't be too hard to make it handle inferring inline modules better, I would think. I won't be able to work on it for a bit though.

mystor commented 7 years ago

Fixed by #24