diff options
| author | Edward Wang <edward.yu.wang@gmail.com> | 2014-04-23 22:43:45 +0800 |
|---|---|---|
| committer | Edward Wang <edward.yu.wang@gmail.com> | 2014-04-23 22:43:45 +0800 |
| commit | 2cf1e4b0ceb4db8ab48144407f3afa9ccd8ced2c (patch) | |
| tree | 6d3f5726096ad4d928f0499629aea4cee0623a5d /src/libsyntax/ext/deriving/default.rs | |
| parent | e049a7003b686002d5c091ec0465d07e5c5ff7a6 (diff) | |
| download | rust-2cf1e4b0ceb4db8ab48144407f3afa9ccd8ced2c.tar.gz rust-2cf1e4b0ceb4db8ab48144407f3afa9ccd8ced2c.zip | |
Honor hidden doc attribute of derivable trait methods
Closes #13698
Diffstat (limited to 'src/libsyntax/ext/deriving/default.rs')
| -rw-r--r-- | src/libsyntax/ext/deriving/default.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/ext/deriving/default.rs b/src/libsyntax/ext/deriving/default.rs index 94675f91e9d..e89e25dd26c 100644 --- a/src/libsyntax/ext/deriving/default.rs +++ b/src/libsyntax/ext/deriving/default.rs @@ -13,12 +13,15 @@ use codemap::Span; use ext::base::ExtCtxt; use ext::build::AstBuilder; use ext::deriving::generic::*; +use parse::token::InternedString; pub fn expand_deriving_default(cx: &mut ExtCtxt, span: Span, 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(), @@ -32,7 +35,7 @@ pub fn expand_deriving_default(cx: &mut ExtCtxt, explicit_self: None, args: Vec::new(), ret_ty: Self, - inline: true, + attributes: attrs, const_nonmatching: false, combine_substructure: default_substructure }) |
