The files are in separate crates:
components/style/selector_matching.rs vs
components/layout/layout_task.rs
Not only that, but the `layout` crate depends on the `style` crate. The
dependency can't go the other way around, because of this.
That being said, why is the code in selector_matching.rs creating the
error reporter value, rather than accepting it as a argument and
allowing the calling code from the `layout` create to create it instead?
Cheers,
Josh
On 2015-10-30 10:38 PM, Gauri Naik wrote:
I have declared a struct in layout_task.rs and I want to reference that struct
from selector_matching.rs
This is my code in selector_matching.rs
use layout_task::CSSErrorReporter;
let error_reporter=box CSSErrorReporter::new() as Box<ParseErrorReporter>;
And my code in layout_task.rs
pub struct CSSErrorReporter {
}
I am getting the following error:
error: unresolved import `layout_task::CSSErrorReporter`. Maybe a missing
`extern crate layout_task`?
Please guide me where I am going wrong.
Thank you
Regards,
Gauri Naik
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo