From 653f257029466fcc587d6ba17495a663cbd1693b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 24 Aug 2014 11:44:58 +0100 Subject: [PATCH] fixup! Move PropertyBitField to a syntax extension. --- src/components/macros/macros.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/macros/macros.rs b/src/components/macros/macros.rs index ecd8915dbc4..f97a7cf2f1e 100644 --- a/src/components/macros/macros.rs +++ b/src/components/macros/macros.rs @@ -15,7 +15,7 @@ extern crate sync; extern crate rustc; extern crate syntax; - + use syntax::ast; use syntax::codemap::Span; use syntax::ext::base; @@ -92,10 +92,12 @@ fn expand_bit_struct(cx: &mut ExtCtxt, sp: Span, name: ast::Ident, tts: Vec bool { (self.storage[$word] & (1 << $bit)) != 0 } #[allow(non_snake_case_functions)] + #[inline] pub fn $setter(&mut self, new_value: bool) { if new_value { self.storage[$word] |= 1 << $bit @@ -118,6 +120,8 @@ fn expand_bit_struct(cx: &mut ExtCtxt, sp: Span, name: ast::Ident, tts: Vec> }