Skip to content

Commit b19f9bc

Browse files
committed
---
yaml --- r: 42422 b: refs/heads/try c: bea67bd h: refs/heads/master v: v3
1 parent e347053 commit b19f9bc

29 files changed

+173
-100
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 3bf8b8af988fa5ffcb12ade36f6da49338df41ea
5+
refs/heads/try: bea67bde21d36df40c55b02cd8d8b28c0ec864b6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/front/core_inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn inject_libcore_ref(sess: Session,
7676
fold_mod: |module, fld| {
7777
let n2 = sess.next_node_id();
7878

79-
let prelude_path = @{
79+
let prelude_path = @ast::path {
8080
span: dummy_sp(),
8181
global: false,
8282
idents: ~[

branches/try/src/librustc/front/test.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,19 @@ fn nospan<T: Copy>(t: T) -> ast::spanned<T> {
244244
}
245245

246246
fn path_node(+ids: ~[ast::ident]) -> @ast::path {
247-
@{span: dummy_sp(), global: false, idents: ids, rp: None, types: ~[]}
247+
@ast::path { span: dummy_sp(),
248+
global: false,
249+
idents: ids,
250+
rp: None,
251+
types: ~[] }
248252
}
249253

250254
fn path_node_global(+ids: ~[ast::ident]) -> @ast::path {
251-
@{span: dummy_sp(), global: true, idents: ids, rp: None, types: ~[]}
255+
@ast::path { span: dummy_sp(),
256+
global: true,
257+
idents: ids,
258+
rp: None,
259+
types: ~[] }
252260
}
253261

254262
fn mk_std(cx: test_ctxt) -> @ast::view_item {

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ fn parse_path(st: @pstate) -> @ast::path {
101101
':' => { next(st); next(st); }
102102
c => {
103103
if c == '(' {
104-
return @{span: ast_util::dummy_sp(),
105-
global: false, idents: idents,
106-
rp: None, types: ~[]};
104+
return @ast::path { span: ast_util::dummy_sp(),
105+
global: false,
106+
idents: idents,
107+
rp: None,
108+
types: ~[] };
107109
} else { idents.push(parse_ident_(st, is_last)); }
108110
}
109111
}

branches/try/src/librustc/middle/liveness.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ fn check_fn(_fk: visit::fn_kind, _decl: fn_decl,
16621662
enum ReadKind {
16631663
PossiblyUninitializedVariable,
16641664
PossiblyUninitializedField,
1665-
MovedValue
1665+
MovedVariable
16661666
}
16671667

16681668
impl @Liveness {
@@ -1815,7 +1815,7 @@ impl @Liveness {
18151815
lnk: LiveNodeKind,
18161816
var: Variable) {
18171817

1818-
// the only time that it is possible to have a moved value
1818+
// the only time that it is possible to have a moved variable
18191819
// used by ExitNode would be arguments or fields in a ctor.
18201820
// we give a slightly different error message in those cases.
18211821
if lnk == ExitNode {
@@ -1837,7 +1837,7 @@ impl @Liveness {
18371837
}
18381838
}
18391839

1840-
self.report_illegal_read(move_span, lnk, var, MovedValue);
1840+
self.report_illegal_read(move_span, lnk, var, MovedVariable);
18411841
self.tcx.sess.span_note(
18421842
move_span, ~"move of variable occurred here");
18431843

@@ -1852,7 +1852,7 @@ impl @Liveness {
18521852
~"possibly uninitialized variable"
18531853
}
18541854
PossiblyUninitializedField => ~"possibly uninitialized field",
1855-
MovedValue => ~"moved value"
1855+
MovedVariable => ~"moved variable"
18561856
};
18571857
let name = (*self.ir).variable_name(var);
18581858
match lnk {

branches/try/src/libsyntax/ast.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ type fn_ident = Option<ident>;
7979

8080
#[auto_encode]
8181
#[auto_decode]
82-
type path = {span: span,
83-
global: bool,
84-
idents: ~[ident],
85-
rp: Option<@region>,
86-
types: ~[@Ty]};
82+
struct path {
83+
span: span,
84+
global: bool,
85+
idents: ~[ident],
86+
rp: Option<@region>,
87+
types: ~[@Ty],
88+
}
8789

8890
type crate_num = int;
8991

branches/try/src/libsyntax/ast_util.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,11 @@ fn default_block(+stmts1: ~[@stmt], expr1: Option<@expr>, id1: node_id) ->
294294
}
295295

296296
fn ident_to_path(s: span, +i: ident) -> @path {
297-
@{span: s, global: false, idents: ~[i],
298-
rp: None, types: ~[]}
297+
@ast::path { span: s,
298+
global: false,
299+
idents: ~[i],
300+
rp: None,
301+
types: ~[] }
299302
}
300303

301304
fn ident_to_pat(id: node_id, s: span, +i: ident) -> @pat {

branches/try/src/libsyntax/ext/auto_encode.rs

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,21 +264,45 @@ priv impl ext_ctxt {
264264
}
265265

266266
fn path(span: span, strs: ~[ast::ident]) -> @ast::path {
267-
@{span: span, global: false, idents: strs, rp: None, types: ~[]}
267+
@ast::path {
268+
span: span,
269+
global: false,
270+
idents: strs,
271+
rp: None,
272+
types: ~[]
273+
}
268274
}
269275

270276
fn path_global(span: span, strs: ~[ast::ident]) -> @ast::path {
271-
@{span: span, global: true, idents: strs, rp: None, types: ~[]}
277+
@ast::path {
278+
span: span,
279+
global: true,
280+
idents: strs,
281+
rp: None,
282+
types: ~[]
283+
}
272284
}
273285

274286
fn path_tps(span: span, strs: ~[ast::ident],
275287
tps: ~[@ast::Ty]) -> @ast::path {
276-
@{span: span, global: false, idents: strs, rp: None, types: tps}
288+
@ast::path {
289+
span: span,
290+
global: false,
291+
idents: strs,
292+
rp: None,
293+
types: tps
294+
}
277295
}
278296

279297
fn path_tps_global(span: span, strs: ~[ast::ident],
280298
tps: ~[@ast::Ty]) -> @ast::path {
281-
@{span: span, global: true, idents: strs, rp: None, types: tps}
299+
@ast::path {
300+
span: span,
301+
global: true,
302+
idents: strs,
303+
rp: None,
304+
types: tps
305+
}
282306
}
283307

284308
fn ty_path(span: span, strs: ~[ast::ident],
@@ -289,11 +313,9 @@ priv impl ext_ctxt {
289313
}
290314

291315
fn binder_pat(span: span, nm: ast::ident) -> @ast::pat {
292-
let path = @{span: span, global: false, idents: ~[nm],
293-
rp: None, types: ~[]};
294316
@{id: self.next_id(),
295317
node: ast::pat_ident(ast::bind_by_ref(ast::m_imm),
296-
path,
318+
self.path(span, ~[nm]),
297319
None),
298320
span: span}
299321
}

branches/try/src/libsyntax/ext/build.rs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,29 @@ fn mk_unary(cx: ext_ctxt, sp: span, op: ast::unop, e: @ast::expr)
5353
mk_expr(cx, sp, ast::expr_unary(op, e))
5454
}
5555
fn mk_raw_path(sp: span, idents: ~[ast::ident]) -> @ast::path {
56-
let p : @ast::path = @{span: sp, global: false, idents: idents,
57-
rp: None, types: ~[]};
56+
let p = @ast::path { span: sp,
57+
global: false,
58+
idents: idents,
59+
rp: None,
60+
types: ~[] };
5861
return p;
5962
}
6063
fn mk_raw_path_(sp: span,
6164
idents: ~[ast::ident],
6265
+types: ~[@ast::Ty])
6366
-> @ast::path {
64-
@{ span: sp, global: false, idents: idents, rp: None, types: move types }
67+
@ast::path { span: sp,
68+
global: false,
69+
idents: idents,
70+
rp: None,
71+
types: move types }
6572
}
6673
fn mk_raw_path_global(sp: span, idents: ~[ast::ident]) -> @ast::path {
67-
let p : @ast::path = @{span: sp, global: true, idents: idents,
68-
rp: None, types: ~[]};
69-
return p;
74+
@ast::path { span: sp,
75+
global: true,
76+
idents: idents,
77+
rp: None,
78+
types: ~[] }
7079
}
7180
fn mk_path(cx: ext_ctxt, sp: span, idents: ~[ast::ident]) ->
7281
@ast::expr {

branches/try/src/libsyntax/ext/concat_idents.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: ~[ast::token_tree])
3636

3737
let e = @{id: cx.next_id(),
3838
callee_id: cx.next_id(),
39-
node: ast::expr_path(@{span: sp, global: false,
40-
idents: ~[res],
41-
rp: None, types: ~[]}),
39+
node: ast::expr_path(@ast::path { span: sp,
40+
global: false,
41+
idents: ~[res],
42+
rp: None,
43+
types: ~[] }),
4244
span: sp};
4345
mr_expr(e)
4446
}

branches/try/src/libsyntax/ext/deriving.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1414
use core::prelude::*;
1515

16+
use ast;
1617
use ast::{TraitTyParamBound, Ty, and, bind_by_ref, binop, deref, enum_def};
1718
use ast::{enum_variant_kind, expr, expr_match, ident, item, item_};
1819
use ast::{item_enum, item_impl, item_struct, m_imm, meta_item, method};
@@ -218,7 +219,7 @@ fn create_derived_impl(cx: ext_ctxt,
218219
let impl_ty_params = dvec::unwrap(move impl_ty_params);
219220

220221
// Create the reference to the trait.
221-
let trait_path = {
222+
let trait_path = ast::path {
222223
span: span,
223224
global: true,
224225
idents: trait_path.map(|x| *x),

branches/try/src/libsyntax/ext/pipes/ast_builder.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ mod syntax {
3434
}
3535

3636
fn path(ids: ~[ident], span: span) -> @ast::path {
37-
@{span: span,
38-
global: false,
39-
idents: ids,
40-
rp: None,
41-
types: ~[]}
37+
@ast::path { span: span,
38+
global: false,
39+
idents: ids,
40+
rp: None,
41+
types: ~[] }
4242
}
4343

4444
fn path_global(ids: ~[ident], span: span) -> @ast::path {
45-
@{span: span,
46-
global: true,
47-
idents: ids,
48-
rp: None,
49-
types: ~[]}
45+
@ast::path { span: span,
46+
global: true,
47+
idents: ids,
48+
rp: None,
49+
types: ~[] }
5050
}
5151

5252
trait append_types {
@@ -56,13 +56,13 @@ trait append_types {
5656

5757
impl @ast::path: append_types {
5858
fn add_ty(ty: @ast::Ty) -> @ast::path {
59-
@{types: vec::append_one(self.types, ty),
60-
.. *self}
59+
@ast::path { types: vec::append_one(self.types, ty),
60+
.. *self}
6161
}
6262

6363
fn add_tys(+tys: ~[@ast::Ty]) -> @ast::path {
64-
@{types: vec::append(self.types, tys),
65-
.. *self}
64+
@ast::path { types: vec::append(self.types, tys),
65+
.. *self}
6666
}
6767
}
6868

branches/try/src/libsyntax/fold.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,11 @@ fn noop_fold_ident(&&i: ident, _fld: ast_fold) -> ident {
614614
}
615615

616616
fn noop_fold_path(&&p: path, fld: ast_fold) -> path {
617-
return {span: fld.new_span(p.span), global: p.global,
618-
idents: vec::map(p.idents, |x| fld.fold_ident(*x)),
619-
rp: p.rp,
620-
types: vec::map(p.types, |x| fld.fold_ty(*x))};
617+
ast::path { span: fld.new_span(p.span),
618+
global: p.global,
619+
idents: p.idents.map(|x| fld.fold_ident(*x)),
620+
rp: p.rp,
621+
types: p.types.map(|x| fld.fold_ty(*x)) }
621622
}
622623

623624
fn noop_fold_local(l: local_, fld: ast_fold) -> local_ {

0 commit comments

Comments
 (0)