Skip to content

Commit a3b2e8c

Browse files
committed
---
yaml --- r: 108543 b: refs/heads/dist-snap c: bb8721d h: refs/heads/master i: 108541: e7b25a3 108539: 9935c38 108535: bf57ba5 108527: 811c49e 108511: 51a86d4 108479: 276bfec 108415: ebc1246 108287: 42cb896 108031: eaec36e 107519: 2d9a72c 106495: 546b03f v: v3
1 parent 6fe89ad commit a3b2e8c

File tree

16 files changed

+27
-9
lines changed

16 files changed

+27
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 87f936f193286e54c38245a6853d8b2977f2aa5b
9+
refs/heads/dist-snap: bb8721da69e4c54fc2e22c3352d74c406e817049
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libsyntax/ext/deriving/clone.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn expand_deriving_clone(cx: &mut ExtCtxt,
2121
push: |@Item|) {
2222
let trait_def = TraitDef {
2323
span: span,
24+
attributes: ~[],
2425
path: Path::new(~["std", "clone", "Clone"]),
2526
additional_bounds: ~[],
2627
generics: LifetimeBounds::empty(),
@@ -48,6 +49,7 @@ pub fn expand_deriving_deep_clone(cx: &mut ExtCtxt,
4849
push: |@Item|) {
4950
let trait_def = TraitDef {
5051
span: span,
52+
attributes: ~[],
5153
path: Path::new(~["std", "clone", "DeepClone"]),
5254
additional_bounds: ~[],
5355
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/cmp/eq.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt,
4747

4848
let trait_def = TraitDef {
4949
span: span,
50+
attributes: ~[],
5051
path: Path::new(~["std", "cmp", "Eq"]),
5152
additional_bounds: ~[],
5253
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/cmp/ord.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub fn expand_deriving_ord(cx: &mut ExtCtxt,
3737

3838
let trait_def = TraitDef {
3939
span: span,
40+
attributes: ~[],
4041
path: Path::new(~["std", "cmp", "Ord"]),
4142
additional_bounds: ~[],
4243
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/cmp/totaleq.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub fn expand_deriving_totaleq(cx: &mut ExtCtxt,
2626

2727
let trait_def = TraitDef {
2828
span: span,
29+
attributes: ~[],
2930
path: Path::new(~["std", "cmp", "TotalEq"]),
3031
additional_bounds: ~[],
3132
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/cmp/totalord.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn expand_deriving_totalord(cx: &mut ExtCtxt,
2323
push: |@Item|) {
2424
let trait_def = TraitDef {
2525
span: span,
26+
attributes: ~[],
2627
path: Path::new(~["std", "cmp", "TotalOrd"]),
2728
additional_bounds: ~[],
2829
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/decodable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub fn expand_deriving_decodable(cx: &mut ExtCtxt,
2828
push: |@Item|) {
2929
let trait_def = TraitDef {
3030
span: span,
31+
attributes: ~[],
3132
path: Path::new_(~["serialize", "Decodable"], None,
3233
~[~Literal(Path::new_local("__D"))], true),
3334
additional_bounds: ~[],

branches/dist-snap/src/libsyntax/ext/deriving/default.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn expand_deriving_default(cx: &mut ExtCtxt,
2121
push: |@Item|) {
2222
let trait_def = TraitDef {
2323
span: span,
24+
attributes: ~[],
2425
path: Path::new(~["std", "default", "Default"]),
2526
additional_bounds: ~[],
2627
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/encodable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ pub fn expand_deriving_encodable(cx: &mut ExtCtxt,
9595
push: |@Item|) {
9696
let trait_def = TraitDef {
9797
span: span,
98+
attributes: ~[],
9899
path: Path::new_(~["serialize", "Encodable"], None,
99100
~[~Literal(Path::new_local("__E"))], true),
100101
additional_bounds: ~[],

branches/dist-snap/src/libsyntax/ext/deriving/generic.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ pub struct TraitDef<'a> {
196196
/// The span for the current #[deriving(Foo)] header.
197197
span: Span,
198198

199+
attributes: ~[ast::Attribute],
200+
199201
/// Path of the trait, including any type parameters
200202
path: Path<'a>,
201203

@@ -355,7 +357,8 @@ impl<'a> TraitDef<'a> {
355357
*/
356358
fn create_derived_impl(&self,
357359
cx: &mut ExtCtxt,
358-
type_ident: Ident, generics: &Generics,
360+
type_ident: Ident,
361+
generics: &Generics,
359362
methods: ~[@ast::Method]) -> @ast::Item {
360363
let trait_path = self.path.to_path(cx, self.span, type_ident, generics);
361364

@@ -408,16 +411,16 @@ impl<'a> TraitDef<'a> {
408411
cx.item(
409412
self.span,
410413
ident,
411-
~[doc_attr],
414+
vec::append(~[doc_attr], self.attributes),
412415
ast::ItemImpl(trait_generics, opt_trait_ref,
413416
self_type, methods.map(|x| *x)))
414417
}
415418

416-
fn expand_struct_def(&self,
417-
cx: &mut ExtCtxt,
418-
struct_def: &StructDef,
419-
type_ident: Ident,
420-
generics: &Generics) -> @ast::Item {
419+
pub fn expand_struct_def(&self,
420+
cx: &mut ExtCtxt,
421+
struct_def: &StructDef,
422+
type_ident: Ident,
423+
generics: &Generics) -> @ast::Item {
421424
let methods = self.methods.map(|method_def| {
422425
let (explicit_self, self_args, nonself_args, tys) =
423426
method_def.split_self_nonself_args(
@@ -447,7 +450,7 @@ impl<'a> TraitDef<'a> {
447450
self.create_derived_impl(cx, type_ident, generics, methods)
448451
}
449452

450-
fn expand_enum_def(&self,
453+
pub fn expand_enum_def(&self,
451454
cx: &mut ExtCtxt,
452455
enum_def: &EnumDef,
453456
type_ident: Ident,

branches/dist-snap/src/libsyntax/ext/deriving/iter_bytes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn expand_deriving_iter_bytes(cx: &mut ExtCtxt,
2222
push: |@Item|) {
2323
let trait_def = TraitDef {
2424
span: span,
25+
attributes: ~[],
2526
path: Path::new(~["std", "to_bytes", "IterBytes"]),
2627
additional_bounds: ~[],
2728
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/primitive.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt,
2323
push: |@Item|) {
2424
let trait_def = TraitDef {
2525
span: span,
26+
attributes: ~[],
2627
path: Path::new(~["std", "num", "FromPrimitive"]),
2728
additional_bounds: ~[],
2829
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/rand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn expand_deriving_rand(cx: &mut ExtCtxt,
2323
push: |@Item|) {
2424
let trait_def = TraitDef {
2525
span: span,
26+
attributes: ~[],
2627
path: Path::new(~["std", "rand", "Rand"]),
2728
additional_bounds: ~[],
2829
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/show.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub fn expand_deriving_show(cx: &mut ExtCtxt,
3131

3232
let trait_def = TraitDef {
3333
span: span,
34+
attributes: ~[],
3435
path: Path::new(~["std", "fmt", "Show"]),
3536
additional_bounds: ~[],
3637
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/to_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn expand_deriving_to_str(cx: &mut ExtCtxt,
2424
push: |@Item|) {
2525
let trait_def = TraitDef {
2626
span: span,
27+
attributes: ~[],
2728
path: Path::new(~["std", "to_str", "ToStr"]),
2829
additional_bounds: ~[],
2930
generics: LifetimeBounds::empty(),

branches/dist-snap/src/libsyntax/ext/deriving/zero.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn expand_deriving_zero(cx: &mut ExtCtxt,
2121
push: |@Item|) {
2222
let trait_def = TraitDef {
2323
span: span,
24+
attributes: ~[],
2425
path: Path::new(~["std", "num", "Zero"]),
2526
additional_bounds: ~[],
2627
generics: LifetimeBounds::empty(),

0 commit comments

Comments
 (0)