Open koenichiwa opened 1 year ago
I got it to work by adding
config.target_rustcflags = Some("-L dependency=../target/debug/deps --extern const_typed_builder=../target/debug/libconst_typed_builder.rlib ".to_string());
Is this best practice?
I think that might be fine, I'm not sure what the best way is (and this crate is not actively maintained). Hope it works!
I have a test package that depends on its parent package. The test code thus depends on the parent package. It seems that compiletest-rs doesn't use the dependencies in Cargo.toml, and I'm trying to figure out another solution.
I'm creating a proc_macro, and tried to test compilation fails with trybuild but ran into this issue. Now I'm trying to do something similar with compiletest-rs, but I can't get it to work. I have the following package structure:
const_typed_builder_test/src/Cargo.toml
includes this line:In
const_typed_builder_test/src/lib.rs
I have the following testIn
const_typed_builder_test/compile_fail/simple_mandatory_1.rs
I have this code:Which is run by
And the first unexpected error I get is
"1:5: 1:24: unresolved import
const_typed_builder[E0432]"