diff options
| author | bors <bors@rust-lang.org> | 2014-04-23 21:46:34 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-23 21:46:34 -0700 |
| commit | 4e1a09844e49a91d0f9dea19561f15d34992d0e8 (patch) | |
| tree | c9a7bd966e7df8ff5964c95cb2fc659dc42e5b70 /src/libsyntax/ext/deriving/primitive.rs | |
| parent | 0e750adefcb1985fc0fa60a240d9b8abbbc457c5 (diff) | |
| parent | 2cf1e4b0ceb4db8ab48144407f3afa9ccd8ced2c (diff) | |
| download | rust-4e1a09844e49a91d0f9dea19561f15d34992d0e8.tar.gz rust-4e1a09844e49a91d0f9dea19561f15d34992d0e8.zip | |
auto merge of #13704 : edwardw/rust/doc-hidden, r=alexcrichton
Closes #13698
Diffstat (limited to 'src/libsyntax/ext/deriving/primitive.rs')
| -rw-r--r-- | src/libsyntax/ext/deriving/primitive.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/ext/deriving/primitive.rs b/src/libsyntax/ext/deriving/primitive.rs index e42a3c67e34..0a7aa591657 100644 --- a/src/libsyntax/ext/deriving/primitive.rs +++ b/src/libsyntax/ext/deriving/primitive.rs @@ -21,6 +21,8 @@ pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt, mitem: @MetaItem, item: @Item, push: |@Item|) { + let inline = cx.meta_word(span, InternedString::new("inline")); + let attrs = vec!(cx.attribute(span, inline)); let trait_def = TraitDef { span: span, attributes: Vec::new(), @@ -38,8 +40,8 @@ pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt, None, vec!(~Self), true)), - // liable to cause code-bloat - inline: true, + // #[inline] liable to cause code-bloat + attributes: attrs.clone(), const_nonmatching: false, combine_substructure: combine_substructure(|c, s, sub| { cs_from("i64", c, s, sub) @@ -55,8 +57,8 @@ pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt, None, vec!(~Self), true)), - // liable to cause code-bloat - inline: true, + // #[inline] liable to cause code-bloat + attributes: attrs, const_nonmatching: false, combine_substructure: combine_substructure(|c, s, sub| { cs_from("u64", c, s, sub) |
