diff options
| author | bors <bors@rust-lang.org> | 2014-03-16 03:21:21 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-16 03:21:21 -0700 |
| commit | d73c899383249e14d9ab74745167f502c31295d3 (patch) | |
| tree | ac69b78ef047e6c62c13a0a2b66301a5390ed474 /src/libsyntax | |
| parent | d956975e7d92f56ebfa6133c45af62d024b888df (diff) | |
| parent | 05c73233e40dad982a87f210273be15824fdab57 (diff) | |
| download | rust-d73c899383249e14d9ab74745167f502c31295d3.tar.gz rust-d73c899383249e14d9ab74745167f502c31295d3.zip | |
auto merge of #12929 : sfackler/rust/automatically-derived, r=cmr
This will enable rustdoc to treat them specially. I also got rid of `std::cmp::cmp2`, which is isomorphic to the `TotalOrd` impl for 2-tuples and never used.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/deriving/generic.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index bc314bc204b..2a828cd5800 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -186,7 +186,6 @@ use codemap; use codemap::Span; use opt_vec; use parse::token::InternedString; -use parse::token; use std::vec_ng::Vec; use std::vec_ng; @@ -399,19 +398,16 @@ impl<'a> TraitDef<'a> { cx.path_all(self.span, false, vec!( type_ident ), self_lifetimes, opt_vec::take_vec(self_ty_params)), None); - let doc_attr = cx.attribute( + let attr = cx.attribute( self.span, - cx.meta_name_value(self.span, - InternedString::new("doc"), - ast::LitStr(token::intern_and_get_ident( - "Automatically derived."), - ast::CookedStr))); + cx.meta_word(self.span, + InternedString::new("automatically_derived"))); let opt_trait_ref = Some(trait_ref); let ident = ast_util::impl_pretty_name(&opt_trait_ref, self_type); cx.item( self.span, ident, - vec_ng::append(vec!(doc_attr), self.attributes.as_slice()), + vec_ng::append(vec!(attr), self.attributes.as_slice()), ast::ItemImpl(trait_generics, opt_trait_ref, self_type, methods.map(|x| *x))) } |
