Skip to content

Commit 905f6e5

Browse files
committed
---
yaml --- r: 40379 b: refs/heads/dist-snap c: f67bfe9 h: refs/heads/master i: 40377: 0523b2b 40375: 76ea339 v: v3
1 parent e74b8b9 commit 905f6e5

File tree

23 files changed

+286
-162
lines changed

23 files changed

+286
-162
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 9ecf86343a136c71cbb2bb8da9bfd1734fec37f4
10+
refs/heads/dist-snap: f67bfe97389a256fc95216c29a2b8a066ee16a2c
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/trans/debuginfo.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use trans::build::B;
88
use middle::ty;
99
use syntax::{ast, codemap, ast_util, ast_map};
1010
use syntax::parse::token::ident_interner;
11-
use codemap::span;
11+
use codemap::{span, CharPos};
1212
use ast::Ty;
1313
use pat_util::*;
1414
use util::ppaux::ty_to_str;
@@ -112,7 +112,7 @@ type compile_unit_md = {name: ~str};
112112
type subprogram_md = {id: ast::node_id};
113113
type local_var_md = {id: ast::node_id};
114114
type tydesc_md = {hash: uint};
115-
type block_md = {start: codemap::Loc, end: codemap::Loc};
115+
type block_md = {start: codemap::Loc<CharPos>, end: codemap::Loc<CharPos>};
116116
type argument_md = {id: ast::node_id};
117117
type retval_md = {id: ast::node_id};
118118

@@ -266,8 +266,8 @@ fn create_block(cx: block) -> @metadata<block_md> {
266266
};
267267
let lldata = ~[lltag(tg),
268268
parent,
269-
lli32(start.line as int),
270-
lli32(start.col as int),
269+
lli32(start.line.to_int()),
270+
lli32(start.col.to_int()),
271271
file_node.node,
272272
lli32(unique_id)
273273
];
@@ -713,8 +713,8 @@ fn update_source_pos(cx: block, s: span) {
713713
let cm = cx.sess().codemap;
714714
let blockmd = create_block(cx);
715715
let loc = cm.lookup_char_pos(s.lo);
716-
let scopedata = ~[lli32(loc.line as int),
717-
lli32(loc.col as int),
716+
let scopedata = ~[lli32(loc.line.to_int()),
717+
lli32(loc.col.to_int()),
718718
blockmd.node,
719719
llnull()];
720720
let dbgscope = llmdnode(scopedata);

branches/dist-snap/src/librustc/util/ppaux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ fn explain_region_and_span(cx: ctxt, region: ty::Region)
106106
-> (~str, Option<span>)
107107
{
108108
let lo = cx.sess.codemap.lookup_char_pos_adj(span.lo);
109-
(fmt!("the %s at %u:%u", heading, lo.line, lo.col), Some(span))
109+
(fmt!("the %s at %u:%u", heading,
110+
lo.line, lo.col.to_uint()), Some(span))
110111
}
111112
}
112113

branches/dist-snap/src/libsyntax/ast_util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use codemap::span;
1+
use codemap::{span, CharPos};
22
use ast::*;
33

4-
pure fn spanned<T>(lo: uint, hi: uint, +t: T) -> spanned<T> {
4+
pure fn spanned<T>(+lo: CharPos, +hi: CharPos, +t: T) -> spanned<T> {
55
respan(mk_sp(lo, hi), move t)
66
}
77

@@ -14,12 +14,12 @@ pure fn dummy_spanned<T>(+t: T) -> spanned<T> {
1414
}
1515

1616
/* assuming that we're not in macro expansion */
17-
pure fn mk_sp(lo: uint, hi: uint) -> span {
17+
pure fn mk_sp(+lo: CharPos, +hi: CharPos) -> span {
1818
span {lo: lo, hi: hi, expn_info: None}
1919
}
2020

2121
// make this a const, once the compiler supports it
22-
pure fn dummy_sp() -> span { return mk_sp(0u, 0u); }
22+
pure fn dummy_sp() -> span { return mk_sp(CharPos(0), CharPos(0)); }
2323

2424

2525

branches/dist-snap/src/libsyntax/attr.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use either::Either;
66
use diagnostic::span_handler;
77
use ast_util::{spanned, dummy_spanned};
88
use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
9+
use codemap::CharPos;
910

1011
// Constructors
1112
export mk_name_value_item_str;
@@ -74,7 +75,8 @@ fn mk_attr(item: @ast::meta_item) -> ast::attribute {
7475
is_sugared_doc: false});
7576
}
7677

77-
fn mk_sugared_doc_attr(text: ~str, lo: uint, hi: uint) -> ast::attribute {
78+
fn mk_sugared_doc_attr(text: ~str,
79+
+lo: CharPos, +hi: CharPos) -> ast::attribute {
7880
let lit = spanned(lo, hi, ast::lit_str(@text));
7981
let attr = {
8082
style: doc_comment_style(text),

0 commit comments

Comments
 (0)