Skip to content

Commit 36143d1

Browse files
committed
---
yaml --- r: 65163 b: refs/heads/master c: 8e9eba8 h: refs/heads/master i: 65161: 386ebf7 65159: 6e0341a v: v3
1 parent cc0e409 commit 36143d1

File tree

13 files changed

+84
-82
lines changed

13 files changed

+84
-82
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 808aada1fb95133f9e9e78be70ad805c0fee4b9c
2+
refs/heads/master: 8e9eba8013490e7b6ba059397bbe73b7128c04b3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5125,7 +5125,7 @@ pub impl Resolver {
51255125
view_path_simple(_, _, id) | view_path_glob(_, id) => {
51265126
if !self.used_imports.contains(&id) {
51275127
self.session.add_lint(unused_imports,
5128-
id, p.span,
5128+
id, vi.span,
51295129
~"unused import");
51305130
}
51315131
}

trunk/src/libsyntax/ext/deriving/clone.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ pub fn expand_deriving_clone(cx: @ext_ctxt,
2121
in_items: ~[@item])
2222
-> ~[@item] {
2323
let trait_def = TraitDef {
24-
path: Path::new(~[~"core", ~"clone", ~"Clone"]),
24+
path: Path::new(~["core", "clone", "Clone"]),
2525
additional_bounds: ~[],
2626
generics: LifetimeBounds::empty(),
2727
methods: ~[
2828
MethodDef {
29-
name: ~"clone",
29+
name: "clone",
3030
generics: LifetimeBounds::empty(),
3131
explicit_self: borrowed_explicit_self(),
3232
args: ~[],
@@ -48,12 +48,12 @@ pub fn expand_deriving_deep_clone(cx: @ext_ctxt,
4848
in_items: ~[@item])
4949
-> ~[@item] {
5050
let trait_def = TraitDef {
51-
path: Path::new(~[~"core", ~"clone", ~"DeepClone"]),
51+
path: Path::new(~["core", "clone", "DeepClone"]),
5252
additional_bounds: ~[],
5353
generics: LifetimeBounds::empty(),
5454
methods: ~[
5555
MethodDef {
56-
name: ~"deep_clone",
56+
name: "deep_clone",
5757
generics: LifetimeBounds::empty(),
5858
explicit_self: borrowed_explicit_self(),
5959
args: ~[],

trunk/src/libsyntax/ext/deriving/cmp/eq.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ pub fn expand_deriving_eq(cx: @ext_ctxt,
3636
generics: LifetimeBounds::empty(),
3737
explicit_self: borrowed_explicit_self(),
3838
args: ~[borrowed_self()],
39-
ret_ty: Literal(Path::new(~[~"bool"])),
39+
ret_ty: Literal(Path::new(~["bool"])),
4040
const_nonmatching: true,
4141
combine_substructure: $f
4242
},
4343
}
4444
);
4545

4646
let trait_def = TraitDef {
47-
path: Path::new(~[~"core", ~"cmp", ~"Eq"]),
47+
path: Path::new(~["core", "cmp", "Eq"]),
4848
additional_bounds: ~[],
4949
generics: LifetimeBounds::empty(),
5050
methods: ~[
51-
md!(~"eq", cs_eq),
52-
md!(~"ne", cs_ne)
51+
md!("eq", cs_eq),
52+
md!("ne", cs_ne)
5353
]
5454
};
5555

trunk/src/libsyntax/ext/deriving/cmp/ord.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn expand_deriving_ord(cx: @ext_ctxt,
2626
generics: LifetimeBounds::empty(),
2727
explicit_self: borrowed_explicit_self(),
2828
args: ~[borrowed_self()],
29-
ret_ty: Literal(Path::new(~[~"bool"])),
29+
ret_ty: Literal(Path::new(~["bool"])),
3030
const_nonmatching: false,
3131
combine_substructure: |cx, span, substr|
3232
cs_ord($less, $equal, cx, span, substr)
@@ -37,15 +37,15 @@ pub fn expand_deriving_ord(cx: @ext_ctxt,
3737

3838

3939
let trait_def = TraitDef {
40-
path: Path::new(~[~"core", ~"cmp", ~"Ord"]),
40+
path: Path::new(~["core", "cmp", "Ord"]),
4141
// XXX: Ord doesn't imply Eq yet
42-
additional_bounds: ~[Literal(Path::new(~[~"core", ~"cmp", ~"Eq"]))],
42+
additional_bounds: ~[Literal(Path::new(~["core", "cmp", "Eq"]))],
4343
generics: LifetimeBounds::empty(),
4444
methods: ~[
45-
md!(~"lt", true, false),
46-
md!(~"le", true, true),
47-
md!(~"gt", false, false),
48-
md!(~"ge", false, true)
45+
md!("lt", true, false),
46+
md!("le", true, true),
47+
md!("gt", false, false),
48+
md!("ge", false, true)
4949
]
5050
};
5151

trunk/src/libsyntax/ext/deriving/cmp/totaleq.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ pub fn expand_deriving_totaleq(cx: @ext_ctxt,
2626
}
2727

2828
let trait_def = TraitDef {
29-
path: Path::new(~[~"core", ~"cmp", ~"TotalEq"]),
29+
path: Path::new(~["core", "cmp", "TotalEq"]),
3030
additional_bounds: ~[],
3131
generics: LifetimeBounds::empty(),
3232
methods: ~[
3333
MethodDef {
34-
name: ~"equals",
34+
name: "equals",
3535
generics: LifetimeBounds::empty(),
3636
explicit_self: borrowed_explicit_self(),
3737
args: ~[borrowed_self()],
38-
ret_ty: Literal(Path::new(~[~"bool"])),
38+
ret_ty: Literal(Path::new(~["bool"])),
3939
const_nonmatching: true,
4040
combine_substructure: cs_equals
4141
}

trunk/src/libsyntax/ext/deriving/cmp/totalord.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ pub fn expand_deriving_totalord(cx: @ext_ctxt,
2020
mitem: @meta_item,
2121
in_items: ~[@item]) -> ~[@item] {
2222
let trait_def = TraitDef {
23-
path: Path::new(~[~"core", ~"cmp", ~"TotalOrd"]),
23+
path: Path::new(~["core", "cmp", "TotalOrd"]),
2424
additional_bounds: ~[],
2525
generics: LifetimeBounds::empty(),
2626
methods: ~[
2727
MethodDef {
28-
name: ~"cmp",
28+
name: "cmp",
2929
generics: LifetimeBounds::empty(),
3030
explicit_self: borrowed_explicit_self(),
3131
args: ~[borrowed_self()],
32-
ret_ty: Literal(Path::new(~[~"core", ~"cmp", ~"Ordering"])),
32+
ret_ty: Literal(Path::new(~["core", "cmp", "Ordering"])),
3333
const_nonmatching: false,
3434
combine_substructure: cs_cmp
3535
}

trunk/src/libsyntax/ext/deriving/generic.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,34 +195,34 @@ pub fn expand_deriving_generic(cx: @ext_ctxt,
195195

196196
pub struct TraitDef<'self> {
197197
/// Path of the trait, including any type parameters
198-
path: Path,
198+
path: Path<'self>,
199199
/// Additional bounds required of any type parameters of the type,
200200
/// other than the current trait
201-
additional_bounds: ~[Ty],
201+
additional_bounds: ~[Ty<'self>],
202202

203203
/// Any extra lifetimes and/or bounds, e.g. `D: std::serialize::Decoder`
204-
generics: LifetimeBounds,
204+
generics: LifetimeBounds<'self>,
205205

206206
methods: ~[MethodDef<'self>]
207207
}
208208

209209

210210
pub struct MethodDef<'self> {
211211
/// name of the method
212-
name: ~str,
212+
name: &'self str,
213213
/// List of generics, e.g. `R: core::rand::Rng`
214-
generics: LifetimeBounds,
214+
generics: LifetimeBounds<'self>,
215215

216216
/// Whether there is a self argument (outer Option) i.e. whether
217217
/// this is a static function, and whether it is a pointer (inner
218218
/// Option)
219-
explicit_self: Option<Option<PtrTy>>,
219+
explicit_self: Option<Option<PtrTy<'self>>>,
220220

221221
/// Arguments other than the self argument
222-
args: ~[Ty],
222+
args: ~[Ty<'self>],
223223

224224
/// Return type
225-
ret_ty: Ty,
225+
ret_ty: Ty<'self>,
226226

227227
/// if the value of the nonmatching enums is independent of the
228228
/// actual enum variants, i.e. can use _ => .. match.

trunk/src/libsyntax/ext/deriving/iter_bytes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ pub fn expand_deriving_iter_bytes(cx: @ext_ctxt,
1919
mitem: @meta_item,
2020
in_items: ~[@item]) -> ~[@item] {
2121
let trait_def = TraitDef {
22-
path: Path::new(~[~"core", ~"to_bytes", ~"IterBytes"]),
22+
path: Path::new(~["core", "to_bytes", "IterBytes"]),
2323
additional_bounds: ~[],
2424
generics: LifetimeBounds::empty(),
2525
methods: ~[
2626
MethodDef {
27-
name: ~"iter_bytes",
27+
name: "iter_bytes",
2828
generics: LifetimeBounds::empty(),
2929
explicit_self: borrowed_explicit_self(),
3030
args: ~[
31-
Literal(Path::new(~[~"bool"])),
32-
Literal(Path::new(~[~"core", ~"to_bytes", ~"Cb"]))
31+
Literal(Path::new(~["bool"])),
32+
Literal(Path::new(~["core", "to_bytes", "Cb"]))
3333
],
34-
ret_ty: Literal(Path::new(~[~"bool"])),
34+
ret_ty: Literal(Path::new(~["bool"])),
3535
const_nonmatching: false,
3636
combine_substructure: iter_bytes_substructure
3737
}

trunk/src/libsyntax/ext/deriving/rand.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ pub fn expand_deriving_rand(cx: @ext_ctxt,
2121
in_items: ~[@item])
2222
-> ~[@item] {
2323
let trait_def = TraitDef {
24-
path: Path::new(~[~"core", ~"rand", ~"Rand"]),
24+
path: Path::new(~["core", "rand", "Rand"]),
2525
additional_bounds: ~[],
2626
generics: LifetimeBounds::empty(),
2727
methods: ~[
2828
MethodDef {
29-
name: ~"rand",
29+
name: "rand",
3030
generics: LifetimeBounds {
3131
lifetimes: ~[],
32-
bounds: ~[(~"R",
33-
~[ Path::new(~[~"core", ~"rand", ~"Rng"]) ])]
32+
bounds: ~[("R",
33+
~[ Path::new(~["core", "rand", "Rng"]) ])]
3434
},
3535
explicit_self: None,
3636
args: ~[
37-
Ptr(~Literal(Path::new_local(~"R")),
37+
Ptr(~Literal(Path::new_local("R")),
3838
Borrowed(None, ast::m_mutbl))
3939
],
4040
ret_ty: Self,

trunk/src/libsyntax/ext/deriving/to_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ pub fn expand_deriving_to_str(cx: @ext_ctxt,
2020
in_items: ~[@item])
2121
-> ~[@item] {
2222
let trait_def = TraitDef {
23-
path: Path::new(~[~"core", ~"to_str", ~"ToStr"]),
23+
path: Path::new(~["core", "to_str", "ToStr"]),
2424
additional_bounds: ~[],
2525
generics: LifetimeBounds::empty(),
2626
methods: ~[
2727
MethodDef {
28-
name: ~"to_str",
28+
name: "to_str",
2929
generics: LifetimeBounds::empty(),
3030
explicit_self: borrowed_explicit_self(),
3131
args: ~[],
32-
ret_ty: Ptr(~Literal(Path::new_local(~"str")), Owned),
32+
ret_ty: Ptr(~Literal(Path::new_local("str")), Owned),
3333
const_nonmatching: false,
3434
combine_substructure: to_str_substructure
3535
}

0 commit comments

Comments
 (0)