Skip to content

Commit 6c6039e

Browse files
committed
---
yaml --- r: 42215 b: refs/heads/master c: 63c16e9 h: refs/heads/master i: 42213: 55531a9 42211: 9ae9338 42207: 37dd33a v: v3
1 parent edd4df8 commit 6c6039e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+431
-579
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: a2839246be0a41a4fe905ab0a52d1a3c7db3397d
2+
refs/heads/master: 63c16e9e79839ba767e2a8c7172d9a330c782600
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/doc/rust.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,6 @@ mod quux {
851851

852852
In this example, the module `quux` re-exports all of the public names defined in `foo`.
853853

854-
Also note that the paths contained in `use` items are relative to the crate root; so, in the previous
855-
example, the use refers to `quux::foo::*`, and not simply to `foo::*`.
856-
857854
### Functions
858855

859856
A _function item_ defines a sequence of [statements](#statements) and an optional final [expression](#expressions), along with a name and a set of parameters.

trunk/src/libcargo/cargo.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub fn load_link(mis: ~[@ast::meta_item]) -> (Option<~str>,
286286
let mut uuid = None;
287287
for mis.each |a| {
288288
match a.node {
289-
ast::meta_name_value(v, codemap::spanned { node: ast::lit_str(s),
289+
ast::meta_name_value(v, ast::spanned { node: ast::lit_str(s),
290290
_ }) => {
291291
match v {
292292
~"name" => name = Some(*s),
@@ -314,7 +314,7 @@ pub fn load_crate(filename: &Path) -> Option<Crate> {
314314

315315
for c.node.attrs.each |a| {
316316
match a.node.value.node {
317-
ast::meta_name_value(v, codemap::spanned { node: ast::lit_str(_),
317+
ast::meta_name_value(v, ast::spanned { node: ast::lit_str(_),
318318
_ }) => {
319319
match v {
320320
~"desc" => desc = Some(v),

trunk/src/libfuzzer/fuzzer.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ pub fn common_exprs() -> ~[ast::expr] {
7474
id: 0,
7575
callee_id: -1,
7676
node: e,
77-
span: codemap::dummy_sp(),
77+
span: ast_util::dummy_sp(),
7878
}
7979
}
8080

8181
fn dsl(l: ast::lit_) -> ast::lit {
82-
codemap::spanned { node: l, span: codemap::dummy_sp() }
82+
ast::spanned { node: l, span: ast_util::dummy_sp() }
8383
}
8484

8585
~[dse(ast::expr_break(option::None)),

trunk/src/librustc/driver/session.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,14 @@ pub mod test {
344344

345345
use syntax::ast;
346346
use syntax::ast_util;
347-
use syntax::codemap;
348347

349348
pub fn make_crate_type_attr(+t: ~str) -> ast::attribute {
350-
codemap::respan(codemap::dummy_sp(), ast::attribute_ {
349+
ast_util::respan(ast_util::dummy_sp(), ast::attribute_ {
351350
style: ast::attr_outer,
352-
value: codemap::respan(codemap::dummy_sp(),
351+
value: ast_util::respan(ast_util::dummy_sp(),
353352
ast::meta_name_value(
354353
~"crate_type",
355-
codemap::respan(codemap::dummy_sp(),
354+
ast_util::respan(ast_util::dummy_sp(),
356355
ast::lit_str(@t)))),
357356
is_sugared_doc: false
358357
})
@@ -362,7 +361,7 @@ pub mod test {
362361
let mut attrs = ~[];
363362
if with_bin { attrs += ~[make_crate_type_attr(~"bin")]; }
364363
if with_lib { attrs += ~[make_crate_type_attr(~"lib")]; }
365-
@codemap::respan(codemap::dummy_sp(), ast::crate_ {
364+
@ast_util::respan(ast_util::dummy_sp(), ast::crate_ {
366365
module: ast::_mod { view_items: ~[], items: ~[] },
367366
attrs: attrs,
368367
config: ~[]

trunk/src/librustc/front/core_inject.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use syntax::ast;
1717
use syntax::ast_util::*;
1818
use syntax::attr;
1919
use syntax::codemap;
20-
use syntax::codemap::dummy_sp;
2120
use syntax::fold;
2221

2322
const CORE_VERSION: &static/str = "0.6";
@@ -37,8 +36,8 @@ fn use_core(crate: @ast::crate) -> bool {
3736

3837
fn inject_libcore_ref(sess: Session,
3938
crate: @ast::crate) -> @ast::crate {
40-
fn spanned<T: Copy>(x: T) -> codemap::spanned<T> {
41-
codemap::spanned { node: x, span: dummy_sp() }
39+
fn spanned<T: Copy>(x: T) -> ast::spanned<T> {
40+
ast::spanned { node: x, span: dummy_sp() }
4241
}
4342

4443
let precursor = @fold::AstFoldFns {

trunk/src/librustc/front/intrinsic_inject.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use core::prelude::*;
1313
use driver::session::Session;
1414
use syntax::parse;
1515
use syntax::ast;
16-
use syntax::codemap::spanned;
1716

1817
use core::vec;
1918

@@ -35,7 +34,7 @@ pub fn inject_intrinsic(sess: Session, crate: @ast::crate) -> @ast::crate {
3534

3635
let items = vec::append(~[item], crate.node.module.items);
3736

38-
@spanned {
37+
@ast::spanned {
3938
node: ast::crate_ {
4039
module: ast::_mod {
4140
items: items,

trunk/src/librustc/front/test.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use core::option;
2121
use core::vec;
2222
use syntax::ast_util::*;
2323
use syntax::attr;
24-
use syntax::codemap::{dummy_sp, span};
25-
use syntax::codemap;
24+
use syntax::codemap::span;
2625
use syntax::fold;
2726
use syntax::print::pprust;
2827
use syntax::{ast, ast_util};
@@ -238,8 +237,8 @@ fn mk_test_module(cx: test_ctxt) -> @ast::item {
238237
return @item;
239238
}
240239

241-
fn nospan<T: Copy>(t: T) -> codemap::spanned<T> {
242-
codemap::spanned { node: t, span: dummy_sp() }
240+
fn nospan<T: Copy>(t: T) -> ast::spanned<T> {
241+
ast::spanned { node: t, span: dummy_sp() }
243242
}
244243

245244
fn path_node(+ids: ~[ast::ident]) -> @ast::path {
@@ -536,7 +535,7 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
536535
let body_: ast::blk_ =
537536
default_block(~[], option::Some(test_main_call_expr),
538537
cx.sess.next_node_id());
539-
let body = codemap::spanned { node: body_, span: dummy_sp() };
538+
let body = ast::spanned { node: body_, span: dummy_sp() };
540539

541540
let item_ = ast::item_fn(decl, ast::impure_fn, ~[], body);
542541
let item = ast::item {

trunk/src/librustc/metadata/creader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use core::either;
2424
use core::option;
2525
use core::vec;
2626
use syntax::attr;
27-
use syntax::codemap::{span, dummy_sp};
27+
use syntax::codemap::span;
2828
use syntax::diagnostic::span_handler;
2929
use syntax::parse::token::ident_interner;
3030
use syntax::print::pprust;
@@ -294,7 +294,7 @@ fn resolve_crate_deps(e: env, cdata: @~[u8]) -> cstore::cnum_map {
294294
// This is a new one so we've got to load it
295295
// FIXME (#2404): Need better error reporting than just a bogus
296296
// span.
297-
let fake_span = dummy_sp();
297+
let fake_span = ast_util::dummy_sp();
298298
let local_cnum = resolve_crate(e, cname, cmetas,
299299
/*bad*/copy dep.hash, fake_span);
300300
cnum_map.insert(extrn_cnum, local_cnum);

trunk/src/librustc/metadata/csearch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use std::ebml;
2626
use std::map::HashMap;
2727
use syntax::ast;
2828
use syntax::ast_map;
29-
use syntax::codemap::dummy_sp;
29+
use syntax::ast_util::dummy_sp;
3030
use syntax::ast_util;
3131
use syntax::diagnostic::expect;
3232
use syntax::diagnostic::span_handler;

trunk/src/librustc/metadata/decoder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ use syntax::diagnostic::span_handler;
4545
use syntax::parse::token::ident_interner;
4646
use syntax::print::pprust;
4747
use syntax::{ast, ast_util};
48-
use syntax::codemap;
4948

5049
// A function that takes a def_id relative to the crate being searched and
5150
// returns a def_id relative to the compilation environment, i.e. if we hit a
@@ -982,13 +981,13 @@ fn get_attributes(md: ebml::Doc) -> ~[ast::attribute] {
982981
assert (vec::len(meta_items) == 1u);
983982
let meta_item = meta_items[0];
984983
attrs.push(
985-
codemap::spanned {
984+
ast::spanned {
986985
node: ast::attribute_ {
987986
style: ast::attr_outer,
988987
value: /*bad*/copy *meta_item,
989988
is_sugared_doc: false,
990989
},
991-
span: codemap::dummy_sp()
990+
span: ast_util::dummy_sp()
992991
});
993992
};
994993
}

trunk/src/librustc/metadata/tydecode.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ use core::uint;
2626
use core::vec;
2727
use syntax::ast;
2828
use syntax::ast::*;
29-
use syntax::codemap::{respan, dummy_sp};
29+
use syntax::ast_util;
30+
use syntax::ast_util::respan;
3031
use std::map::HashMap;
3132

3233
// Compact string representation for ty::t values. API ty_str &
@@ -113,7 +114,7 @@ fn parse_path(st: @pstate) -> @ast::path {
113114
':' => { next(st); next(st); }
114115
c => {
115116
if c == '(' {
116-
return @ast::path { span: dummy_sp(),
117+
return @ast::path { span: ast_util::dummy_sp(),
117118
global: false,
118119
idents: idents,
119120
rp: None,

trunk/src/librustc/middle/astencode.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl extended_decode_ctxt {
220220
ast::def_id { crate: ast::local_crate, node: self.tr_id(did.node) }
221221
}
222222
fn tr_span(_span: span) -> span {
223-
codemap::dummy_sp() // FIXME (#1972): handle span properly
223+
ast_util::dummy_sp() // FIXME (#1972): handle span properly
224224
}
225225
}
226226

@@ -300,9 +300,9 @@ fn simplify_ast(ii: ast::inlined_item) -> ast::inlined_item {
300300
let stmts_sans_items = do blk.stmts.filtered |stmt| {
301301
match stmt.node {
302302
ast::stmt_expr(_, _) | ast::stmt_semi(_, _) |
303-
ast::stmt_decl(@codemap::spanned { node: ast::decl_local(_),
303+
ast::stmt_decl(@ast::spanned { node: ast::decl_local(_),
304304
span: _}, _) => true,
305-
ast::stmt_decl(@codemap::spanned { node: ast::decl_item(_),
305+
ast::stmt_decl(@ast::spanned { node: ast::decl_item(_),
306306
span: _}, _) => false,
307307
ast::stmt_mac(*) => die!(~"unexpanded macro in astencode")
308308
}
@@ -336,7 +336,7 @@ fn simplify_ast(ii: ast::inlined_item) -> ast::inlined_item {
336336
ast::ii_dtor(ref dtor, nm, ref tps, parent_id) => {
337337
let dtor_body = fld.fold_block((*dtor).node.body);
338338
ast::ii_dtor(
339-
codemap::spanned {
339+
ast::spanned {
340340
node: ast::struct_dtor_ { body: dtor_body,
341341
.. /*bad*/copy (*dtor).node },
342342
.. (/*bad*/copy *dtor) },
@@ -377,7 +377,7 @@ fn renumber_ast(xcx: extended_decode_ctxt, ii: ast::inlined_item)
377377
let new_parent = xcx.tr_def_id(parent_id);
378378
let new_self = fld.new_id((*dtor).node.self_id);
379379
ast::ii_dtor(
380-
codemap::spanned {
380+
ast::spanned {
381381
node: ast::struct_dtor_ { id: dtor_id,
382382
attrs: dtor_attrs,
383383
self_id: new_self,

trunk/src/librustc/middle/check_const.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use core::dvec::DVec;
2020
use core::option;
2121
use std::map::HashMap;
2222
use syntax::ast::*;
23-
use syntax::codemap;
2423
use syntax::{visit, ast_util, ast_map};
2524

2625
pub fn check_crate(sess: Session,
@@ -65,10 +64,7 @@ pub fn check_pat(p: @pat, &&_is_const: bool, v: visit::vt<bool>) {
6564
fn is_str(e: @expr) -> bool {
6665
match e.node {
6766
expr_vstore(
68-
@expr { node: expr_lit(@codemap::spanned {
69-
node: lit_str(_),
70-
_}),
71-
_ },
67+
@expr { node: expr_lit(@spanned { node: lit_str(_), _}), _ },
7268
expr_vstore_uniq
7369
) => true,
7470
_ => false
@@ -100,7 +96,7 @@ pub fn check_expr(sess: Session,
10096
~"disallowed operator in constant expression");
10197
return;
10298
}
103-
expr_lit(@codemap::spanned {node: lit_str(_), _}) => { }
99+
expr_lit(@spanned {node: lit_str(_), _}) => { }
104100
expr_binary(_, _, _) | expr_unary(_, _) => {
105101
if method_map.contains_key(e.id) {
106102
sess.span_err(e.span, ~"user-defined operators are not \
@@ -187,15 +183,15 @@ pub fn check_expr(sess: Session,
187183
}
188184
}
189185
match e.node {
190-
expr_lit(@codemap::spanned {node: lit_int(v, t), _}) => {
186+
expr_lit(@spanned {node: lit_int(v, t), _}) => {
191187
if t != ty_char {
192188
if (v as u64) > ast_util::int_ty_max(
193189
if t == ty_i { sess.targ_cfg.int_type } else { t }) {
194190
sess.span_err(e.span, ~"literal out of range for its type");
195191
}
196192
}
197193
}
198-
expr_lit(@codemap::spanned {node: lit_uint(v, t), _}) => {
194+
expr_lit(@spanned {node: lit_uint(v, t), _}) => {
199195
if v > ast_util::uint_ty_max(
200196
if t == ty_u { sess.targ_cfg.uint_type } else { t }) {
201197
sess.span_err(e.span, ~"literal out of range for its type");

trunk/src/librustc/middle/check_match.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ use core::vec;
2626
use std::map::HashMap;
2727
use std::sort;
2828
use syntax::ast::*;
29-
use syntax::ast_util::{variant_def_ids, unguarded_pat, walk_pat};
30-
use syntax::codemap::{span, dummy_sp, spanned};
29+
use syntax::ast_util::{variant_def_ids, dummy_sp, unguarded_pat, walk_pat};
30+
use syntax::ast_util;
31+
use syntax::codemap::span;
3132
use syntax::print::pprust::pat_to_str;
3233
use syntax::visit;
3334

@@ -463,7 +464,7 @@ pub fn ctor_arity(cx: @MatchCheckCtxt, ctor: ctor, ty: ty::t) -> uint {
463464
}
464465
465466
pub fn wild() -> @pat {
466-
@pat {id: 0, node: pat_wild, span: dummy_sp()}
467+
@pat {id: 0, node: pat_wild, span: ast_util::dummy_sp()}
467468
}
468469
469470
pub fn specialize(cx: @MatchCheckCtxt,

trunk/src/librustc/middle/kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use core::str;
2626
use core::vec;
2727
use std::map::HashMap;
2828
use syntax::ast::*;
29-
use syntax::codemap::{span, spanned};
29+
use syntax::codemap::span;
3030
use syntax::print::pprust::expr_to_str;
3131
use syntax::{visit, ast_util};
3232

trunk/src/librustc/middle/lint.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use std::oldsmallintmap;
3939
use syntax::ast_util::{path_to_ident};
4040
use syntax::attr;
4141
use syntax::codemap::span;
42-
use syntax::codemap;
4342
use syntax::print::pprust::{expr_to_str, mode_to_str, pat_to_str};
4443
use syntax::{ast, ast_util, visit};
4544

@@ -454,7 +453,7 @@ fn check_item_while_true(cx: ty::ctxt, it: @ast::item) {
454453
match e.node {
455454
ast::expr_while(cond, _) => {
456455
match cond.node {
457-
ast::expr_lit(@codemap::spanned {
456+
ast::expr_lit(@ast::spanned {
458457
node: ast::lit_bool(true), _}) =>
459458
{
460459
cx.sess.span_lint(

trunk/src/librustc/middle/pat_util.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ use middle::resolve;
1414
use middle::ty;
1515

1616
use syntax::ast::*;
17-
use syntax::ast_util::{path_to_ident, walk_pat};
17+
use syntax::ast_util;
18+
use syntax::ast_util::{path_to_ident, respan, walk_pat};
1819
use syntax::fold;
1920
use syntax::fold::*;
20-
use syntax::codemap::{span, respan};
21+
use syntax::codemap::span;
2122
use std::map::HashMap;
2223

2324
pub type PatIdMap = HashMap<ident, node_id>;

trunk/src/librustc/middle/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ use syntax::ast::{variant, view_item, view_item_import};
5858
use syntax::ast::{view_item_use, view_path_glob, view_path_list};
5959
use syntax::ast::{view_path_simple, visibility, anonymous, named, not};
6060
use syntax::ast::{unsafe_fn};
61-
use syntax::ast_util::{def_id_of_def, local_def};
61+
use syntax::ast_util::{def_id_of_def, dummy_sp, local_def};
6262
use syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
6363
use syntax::ast_util::{Privacy, Public, Private};
6464
use syntax::ast_util::{variant_visibility_to_privacy, visibility_to_privacy};
6565
use syntax::attr::{attr_metas, contains_name, attrs_contains_name};
6666
use syntax::parse::token::ident_interner;
6767
use syntax::parse::token::special_idents;
6868
use syntax::print::pprust::{pat_to_str, path_to_str};
69-
use syntax::codemap::{span, dummy_sp};
69+
use syntax::codemap::span;
7070
use syntax::visit::{default_visitor, fk_method, mk_vt, Visitor, visit_block};
7171
use syntax::visit::{visit_crate, visit_expr, visit_expr_opt, visit_fn};
7272
use syntax::visit::{visit_foreign_item, visit_item, visit_method_helper};

0 commit comments

Comments
 (0)