This is a tricky one. I suspect if we look closely at the error
messages, they would actually be pointing at a line _inside_ of the
`get_specified` macro, rather than directly at users of the macro.
Specifically, `get_specified!(get_box, display, value)` ends up
expanding as something like this
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.r
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;
And my code in layout_task.rs
pub struct CSSErrorReporter
Thank you very much Josh for the prompt reply.
Regards,
Gauri Naik
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo
Hi,
We are getting an error "This function takes 4 parameters but 3 were
supplied" for all the instances of the function get_specified!.
When I look up the definition of the function at line 6505 in
properties.mako.rs it looks as follows:
macro_rules! get_specified( ($style_struct_getter: ide
You'll want to box an instance of the type that implements the trait,
rather than the name of the trait itself - Box::new(ParseErrorReporter)
Cheers,
Josh
On 2015-10-30 7:17 PM, Gauri Naik wrote:
let x=Box::new(style_traits::ParseErrorReporterTrait);
Is the above the right way to create a t
let x=Box::new(style_traits::ParseErrorReporterTrait);
Is the above the right way to create a trait object and pass it to the
functions which create a new ParserContext ?
I get an unresolved name error for the above, even though I have declared
the crate in the file as follows:
use style_traits
7 matches
Mail list logo