From 98d0402d87732a2b7187d290395fe3bf74a0e3fd Mon Sep 17 00:00:00 2001 From: Chris Wong <lambda.fairy@gmail.com> Date: Tue, 27 Dec 2016 21:22:37 +1300 Subject: [PATCH] Add `#[allow(unused_imports)]` to generated code This prevents a warning when the trait is already in scope. --- maud_macros/src/render.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/maud_macros/src/render.rs b/maud_macros/src/render.rs index 3119c50..c21fe7e 100644 --- a/maud_macros/src/render.rs +++ b/maud_macros/src/render.rs @@ -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); });