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 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::ParseErrorReporter;
Please correct me where I am going wrong
Thank you.
Regards,
Gauri Naik
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo