diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-09 15:38:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 15:38:53 -0800 |
commit | 1320efeb79d373acb8dd92fb2722732c251497d8 (patch) | |
tree | 31808e6a4fbf7c84331536a139a4a1179cd73437 /src/codegen/helpers.rs | |
parent | ecd9770147f6af15a704e2fea61450fea1b1c52f (diff) | |
parent | e0ca63263c144ef41975c5440812c9c6cde2be91 (diff) |
Auto merge of #565 - framlog:master, r=fitzgen
automatically allow non rust naming conventions
+ related issue: #562
I just added those attributes at the root mod. And I'm not sure whether it should be better if we could set this setting in `build.rs`.
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() } |