diff options
Diffstat (limited to 'src/codegen/helpers.rs')
-rw-r--r-- | src/codegen/helpers.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen/helpers.rs b/src/codegen/helpers.rs index 06dadab0..811d87c5 100644 --- a/src/codegen/helpers.rs +++ b/src/codegen/helpers.rs @@ -10,6 +10,10 @@ pub mod attributes { use aster; use syntax::ast; + pub fn allow(which_ones: &[&str]) -> ast::Attribute { + aster::AstBuilder::new().attr().list("allow").words(which_ones).build() + } + pub fn repr(which: &str) -> ast::Attribute { aster::AstBuilder::new().attr().list("repr").words(&[which]).build() } |