Add #[allow(unused_imports)] to generated code

This prevents a warning when the trait is already in scope.
This commit is contained in:
Chris Wong 2016-12-27 21:22:37 +13:00
parent cd5e247f53
commit 98d0402d87

View file

@ -90,6 +90,7 @@ impl<'cx, 'a> Renderer<'cx, 'a> {
pub fn splice(&mut self, expr: P<Expr>) {
let w = self.writer;
let expr = quote_expr!(self.cx, {
#[allow(unused_imports)]
use ::maud::Render as __maud_Render;
$expr.render_to(&mut $w);
});