From: bors Date: Thu, 24 Apr 2014 04:46:34 +0000 (-0700) Subject: auto merge of #13704 : edwardw/rust/doc-hidden, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=4e1a09844e49a91d0f9dea19561f15d34992d0e8;p=rust.git auto merge of #13704 : edwardw/rust/doc-hidden, r=alexcrichton Closes #13698 --- 4e1a09844e49a91d0f9dea19561f15d34992d0e8 diff --cc src/libsyntax/ext/deriving/clone.rs index e0b493cd8d9,6db99548206..51024158822 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@@ -32,11 -35,9 +35,11 @@@ pub fn expand_deriving_clone(cx: &mut E explicit_self: borrowed_explicit_self(), args: Vec::new(), ret_ty: Self, - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: |c, s, sub| cs_clone("Clone", c, s, sub) + combine_substructure: combine_substructure(|c, s, sub| { + cs_clone("Clone", c, s, sub) + }), } ) }; diff --cc src/libsyntax/ext/deriving/cmp/eq.rs index 35b7e7c1a66,8a877a2a7a4..92b3788c247 --- a/src/libsyntax/ext/deriving/cmp/eq.rs +++ b/src/libsyntax/ext/deriving/cmp/eq.rs @@@ -38,13 -41,11 +41,13 @@@ pub fn expand_deriving_eq(cx: &mut ExtC explicit_self: borrowed_explicit_self(), args: vec!(borrowed_self()), ret_ty: Literal(Path::new(vec!("bool"))), - inline: true, + attributes: attrs, const_nonmatching: true, - combine_substructure: $f + combine_substructure: combine_substructure(|a, b, c| { + $f(a, b, c) + }) } - } + } } ); let trait_def = TraitDef { diff --cc src/libsyntax/ext/deriving/cmp/ord.rs index afe2d3dae6a,2b2a490e5a4..dd2f90cfa5f --- a/src/libsyntax/ext/deriving/cmp/ord.rs +++ b/src/libsyntax/ext/deriving/cmp/ord.rs @@@ -28,13 -31,11 +31,13 @@@ pub fn expand_deriving_ord(cx: &mut Ext explicit_self: borrowed_explicit_self(), args: vec!(borrowed_self()), ret_ty: Literal(Path::new(vec!("bool"))), - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: |cx, span, substr| cs_op($op, $equal, cx, span, substr) + combine_substructure: combine_substructure(|cx, span, substr| { + cs_op($op, $equal, cx, span, substr) + }) } - } + } } ); let trait_def = TraitDef { diff --cc src/libsyntax/ext/deriving/cmp/totaleq.rs index d161f966850,24e0fc73f2a..b76caccffec --- a/src/libsyntax/ext/deriving/cmp/totaleq.rs +++ b/src/libsyntax/ext/deriving/cmp/totaleq.rs @@@ -46,11 -52,9 +52,11 @@@ pub fn expand_deriving_totaleq(cx: &mu explicit_self: borrowed_explicit_self(), args: vec!(), ret_ty: nil_ty(), - inline: true, + attributes: attrs, const_nonmatching: true, - combine_substructure: cs_total_eq_assert + combine_substructure: combine_substructure(|a, b, c| { + cs_total_eq_assert(a, b, c) + }) } ) }; diff --cc src/libsyntax/ext/deriving/cmp/totalord.rs index 69c413890e9,c2e52f7ef77..3ca4f9e2862 --- a/src/libsyntax/ext/deriving/cmp/totalord.rs +++ b/src/libsyntax/ext/deriving/cmp/totalord.rs @@@ -35,11 -38,9 +38,11 @@@ pub fn expand_deriving_totalord(cx: &mu explicit_self: borrowed_explicit_self(), args: vec!(borrowed_self()), ret_ty: Literal(Path::new(vec!("std", "cmp", "Ordering"))), - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: cs_cmp + combine_substructure: combine_substructure(|a, b, c| { + cs_cmp(a, b, c) + }), } ) }; diff --cc src/libsyntax/ext/deriving/decodable.rs index 6d6cdc55d40,56fde41635f..062f198425b --- a/src/libsyntax/ext/deriving/decodable.rs +++ b/src/libsyntax/ext/deriving/decodable.rs @@@ -50,11 -50,9 +50,11 @@@ pub fn expand_deriving_decodable(cx: &m Borrowed(None, MutMutable))), ret_ty: Literal(Path::new_(vec!("std", "result", "Result"), None, vec!(~Self, ~Literal(Path::new_local("__E"))), true)), - inline: false, + attributes: Vec::new(), const_nonmatching: true, - combine_substructure: decodable_substructure, + combine_substructure: combine_substructure(|a, b, c| { + decodable_substructure(a, b, c) + }), }) }; diff --cc src/libsyntax/ext/deriving/default.rs index 633674eff5c,e89e25dd26c..c225906ed2b --- a/src/libsyntax/ext/deriving/default.rs +++ b/src/libsyntax/ext/deriving/default.rs @@@ -32,11 -35,9 +35,11 @@@ pub fn expand_deriving_default(cx: &mu explicit_self: None, args: Vec::new(), ret_ty: Self, - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: default_substructure + combine_substructure: combine_substructure(|a, b, c| { + default_substructure(a, b, c) + }) }) }; trait_def.expand(cx, mitem, item, push) diff --cc src/libsyntax/ext/deriving/encodable.rs index acdef8c8645,8fdb994ecdd..ec3d4e0078b --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@@ -121,11 -121,9 +121,11 @@@ pub fn expand_deriving_encodable(cx: &m vec!(~Tuple(Vec::new()), ~Literal(Path::new_local("__E"))), true)), - inline: false, + attributes: Vec::new(), const_nonmatching: true, - combine_substructure: encodable_substructure, + combine_substructure: combine_substructure(|a, b, c| { + encodable_substructure(a, b, c) + }), }) }; diff --cc src/libsyntax/ext/deriving/hash.rs index 9e160b0e35d,c6f0900d27b..d367ae61e0b --- a/src/libsyntax/ext/deriving/hash.rs +++ b/src/libsyntax/ext/deriving/hash.rs @@@ -47,11 -50,9 +50,11 @@@ pub fn expand_deriving_hash(cx: &mut Ex explicit_self: borrowed_explicit_self(), args: vec!(Ptr(~Literal(args), Borrowed(None, MutMutable))), ret_ty: nil_ty(), - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: hash_substructure + combine_substructure: combine_substructure(|a, b, c| { + hash_substructure(a, b, c) + }) } ) }; diff --cc src/libsyntax/ext/deriving/primitive.rs index e42a3c67e34,90b011d24e3..0a7aa591657 --- a/src/libsyntax/ext/deriving/primitive.rs +++ b/src/libsyntax/ext/deriving/primitive.rs @@@ -38,12 -40,10 +40,12 @@@ pub fn expand_deriving_from_primitive(c 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: |c, s, sub| cs_from("i64", c, s, sub), + combine_substructure: combine_substructure(|c, s, sub| { + cs_from("i64", c, s, sub) + }), }, MethodDef { name: "from_u64", @@@ -55,12 -55,10 +57,12 @@@ None, vec!(~Self), true)), - // liable to cause code-bloat - inline: true, + // #[inline] liable to cause code-bloat + attributes: attrs, const_nonmatching: false, - combine_substructure: |c, s, sub| cs_from("u64", c, s, sub), + combine_substructure: combine_substructure(|c, s, sub| { + cs_from("u64", c, s, sub) + }), }) }; diff --cc src/libsyntax/ext/deriving/rand.rs index 09c3abf42b8,597e0959de2..23877dd29ea --- a/src/libsyntax/ext/deriving/rand.rs +++ b/src/libsyntax/ext/deriving/rand.rs @@@ -41,11 -41,9 +41,11 @@@ pub fn expand_deriving_rand(cx: &mut Ex Borrowed(None, ast::MutMutable)) ), ret_ty: Self, - inline: false, + attributes: Vec::new(), const_nonmatching: false, - combine_substructure: rand_substructure + combine_substructure: combine_substructure(|a, b, c| { + rand_substructure(a, b, c) + }) } ) }; diff --cc src/libsyntax/ext/deriving/show.rs index 7098d0dd6ef,153374fbc16..b9725361538 --- a/src/libsyntax/ext/deriving/show.rs +++ b/src/libsyntax/ext/deriving/show.rs @@@ -42,11 -42,9 +42,11 @@@ pub fn expand_deriving_show(cx: &mut Ex explicit_self: borrowed_explicit_self(), args: vec!(fmtr), ret_ty: Literal(Path::new(vec!("std", "fmt", "Result"))), - inline: false, + attributes: Vec::new(), const_nonmatching: false, - combine_substructure: show_substructure + combine_substructure: combine_substructure(|a, b, c| { + show_substructure(a, b, c) + }) } ) }; diff --cc src/libsyntax/ext/deriving/zero.rs index 0aeeabcaeab,cbb113f15f7..449851dd3ea --- a/src/libsyntax/ext/deriving/zero.rs +++ b/src/libsyntax/ext/deriving/zero.rs @@@ -32,11 -35,9 +35,11 @@@ pub fn expand_deriving_zero(cx: &mut Ex explicit_self: None, args: Vec::new(), ret_ty: Self, - inline: true, + attributes: attrs.clone(), const_nonmatching: false, - combine_substructure: zero_substructure + combine_substructure: combine_substructure(|a, b, c| { + zero_substructure(a, b, c) + }) }, MethodDef { name: "is_zero", @@@ -44,9 -45,9 +47,9 @@@ explicit_self: borrowed_explicit_self(), args: Vec::new(), ret_ty: Literal(Path::new(vec!("bool"))), - inline: true, + attributes: attrs, const_nonmatching: false, - combine_substructure: |cx, span, substr| { + combine_substructure: combine_substructure(|cx, span, substr| { cs_and(|cx, span, _, _| cx.span_bug(span, "Non-matching enum \ variant in \