mystor / rust-cpp

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

Error parsing when using nested modules #23

Closed uzytkownik closed 6 years ago

uzytkownik commented 6 years ago

I tried to use nested modules

// lib.rs
mod foo {
    mod bar;
}
// foo/bar.rs
fn foo() {}

But it causes error:

warning: -- rust-cpp parse error --
warning: 
warning: There was an error parsing the crate for the rust-cpp build script:
warning: 
warning: Error while parsing `mod info` statement at lib.rs:2:4
warning: No file with module definition for `mod bar`
warning: 
warning: In order to provide a better error message, the build script will exit
warning: successfully, such that rustc can provide an error message.

It compiles with rustc successfully (well, ignoring linking errors due to missing symbols)

mystor commented 6 years ago

I think this was the same as #17. Should be fixed by #24 and on crates.io as version 0.3.2.

uzytkownik commented 6 years ago

I can reproduce it with 0.3.2. EDIT: Sorry, my mistake.