Skip to content

Commit 2439f7a

Browse files
committed
---
yaml --- r: 174258 b: refs/heads/auto c: 37c3573c6a6d363bc06f5039ee7d4b882bf9a905 h: refs/heads/master v: v3
1 parent c3c63e8 commit 2439f7a

File tree

8 files changed

+41
-41
lines changed

8 files changed

+41
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 12f9fb88e0c3bc0ad881c519b655fe4130126d2a
13+
refs/heads/auto: 37c3573c6a6d363bc06f5039ee7d4b882bf9a905
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub trait AstBuilder {
135135
fn expr_lit(&self, sp: Span, lit: ast::Lit_) -> P<ast::Expr>;
136136

137137
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr>;
138-
fn expr_int(&self, sp: Span, i: int) -> P<ast::Expr>;
138+
fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr>;
139139
fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr>;
140140
fn expr_bool(&self, sp: Span, value: bool) -> P<ast::Expr>;
141141

@@ -644,7 +644,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
644644
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> {
645645
self.expr_lit(span, ast::LitInt(i as u64, ast::UnsignedIntLit(ast::TyUs(false))))
646646
}
647-
fn expr_int(&self, sp: Span, i: int) -> P<ast::Expr> {
647+
fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr> {
648648
self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs(false),
649649
ast::Sign::new(i))))
650650
}

branches/auto/src/libsyntax/parse/lexer/comments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn read_block_comment(rdr: &mut StringReader,
267267
assert!(!curr_line.contains_char('\n'));
268268
lines.push(curr_line);
269269
} else {
270-
let mut level: int = 1;
270+
let mut level: isize = 1;
271271
while level > 0 {
272272
debug!("=== block comment level {}", level);
273273
if rdr.is_eof() {

branches/auto/src/libsyntax/parse/lexer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ impl<'a> StringReader<'a> {
519519
let is_doc_comment = self.curr_is('*') || self.curr_is('!');
520520
let start_bpos = self.last_pos - BytePos(2);
521521

522-
let mut level: int = 1;
522+
let mut level: isize = 1;
523523
let mut has_cr = false;
524524
while level > 0 {
525525
if self.is_eof() {

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ pub struct Parser<'a> {
290290
/// the previous token or None (only stashed sometimes).
291291
pub last_token: Option<Box<token::Token>>,
292292
pub buffer: [TokenAndSpan; 4],
293-
pub buffer_start: int,
294-
pub buffer_end: int,
293+
pub buffer_start: isize,
294+
pub buffer_end: isize,
295295
pub tokens_consumed: usize,
296296
pub restrictions: Restrictions,
297297
pub quote_depth: usize, // not (yet) related to the quasiquoter
@@ -934,7 +934,7 @@ impl<'a> Parser<'a> {
934934
// Avoid token copies with `replace`.
935935
let buffer_start = self.buffer_start as usize;
936936
let next_index = (buffer_start + 1) & 3 as usize;
937-
self.buffer_start = next_index as int;
937+
self.buffer_start = next_index as isize;
938938

939939
let placeholder = TokenAndSpan {
940940
tok: token::Underscore,
@@ -966,7 +966,7 @@ impl<'a> Parser<'a> {
966966
self.token = next;
967967
self.span = mk_sp(lo, hi);
968968
}
969-
pub fn buffer_length(&mut self) -> int {
969+
pub fn buffer_length(&mut self) -> isize {
970970
if self.buffer_start <= self.buffer_end {
971971
return self.buffer_end - self.buffer_start;
972972
}
@@ -975,7 +975,7 @@ impl<'a> Parser<'a> {
975975
pub fn look_ahead<R, F>(&mut self, distance: usize, f: F) -> R where
976976
F: FnOnce(&token::Token) -> R,
977977
{
978-
let dist = distance as int;
978+
let dist = distance as isize;
979979
while self.buffer_length() < dist {
980980
self.buffer[self.buffer_end as usize] = self.reader.real_token();
981981
self.buffer_end = (self.buffer_end + 1) & 3;

branches/auto/src/libsyntax/print/pp.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ pub enum Breaks {
7171

7272
#[derive(Clone, Copy)]
7373
pub struct BreakToken {
74-
offset: int,
75-
blank_space: int
74+
offset: isize,
75+
blank_space: isize
7676
}
7777

7878
#[derive(Clone, Copy)]
7979
pub struct BeginToken {
80-
offset: int,
80+
offset: isize,
8181
breaks: Breaks
8282
}
8383

8484
#[derive(Clone)]
8585
pub enum Token {
86-
String(String, int),
86+
String(String, isize),
8787
Break(BreakToken),
8888
Begin(BeginToken),
8989
End,
@@ -122,7 +122,7 @@ pub fn tok_str(token: &Token) -> String {
122122
}
123123

124124
pub fn buf_str(toks: &[Token],
125-
szs: &[int],
125+
szs: &[isize],
126126
left: usize,
127127
right: usize,
128128
lim: usize)
@@ -155,25 +155,25 @@ pub enum PrintStackBreak {
155155

156156
#[derive(Copy)]
157157
pub struct PrintStackElem {
158-
offset: int,
158+
offset: isize,
159159
pbreak: PrintStackBreak
160160
}
161161

162-
static SIZE_INFINITY: int = 0xffff;
162+
static SIZE_INFINITY: isize = 0xffff;
163163

164164
pub fn mk_printer(out: Box<io::Writer+'static>, linewidth: usize) -> Printer {
165165
// Yes 3, it makes the ring buffers big enough to never
166166
// fall behind.
167167
let n: usize = 3 * linewidth;
168168
debug!("mk_printer {}", linewidth);
169169
let token: Vec<Token> = repeat(Token::Eof).take(n).collect();
170-
let size: Vec<int> = repeat(0i).take(n).collect();
170+
let size: Vec<isize> = repeat(0i).take(n).collect();
171171
let scan_stack: Vec<usize> = repeat(0us).take(n).collect();
172172
Printer {
173173
out: out,
174174
buf_len: n,
175-
margin: linewidth as int,
176-
space: linewidth as int,
175+
margin: linewidth as isize,
176+
space: linewidth as isize,
177177
left: 0,
178178
right: 0,
179179
token: token,
@@ -269,21 +269,21 @@ pub struct Printer {
269269
pub out: Box<io::Writer+'static>,
270270
buf_len: usize,
271271
/// Width of lines we're constrained to
272-
margin: int,
272+
margin: isize,
273273
/// Number of spaces left on line
274-
space: int,
274+
space: isize,
275275
/// Index of left side of input stream
276276
left: usize,
277277
/// Index of right side of input stream
278278
right: usize,
279279
/// Ring-buffer stream goes through
280280
token: Vec<Token> ,
281281
/// Ring-buffer of calculated sizes
282-
size: Vec<int> ,
282+
size: Vec<isize> ,
283283
/// Running size of stream "...left"
284-
left_total: int,
284+
left_total: isize,
285285
/// Running size of stream "...right"
286-
right_total: int,
286+
right_total: isize,
287287
/// Pseudo-stack, really a ring too. Holds the
288288
/// primary-ring-buffers index of the Begin that started the
289289
/// current block, possibly with the most recent Break after that
@@ -300,7 +300,7 @@ pub struct Printer {
300300
/// Stack of blocks-in-progress being flushed by print
301301
print_stack: Vec<PrintStackElem> ,
302302
/// Buffered indentation to avoid writing trailing whitespace
303-
pending_indentation: int,
303+
pending_indentation: isize,
304304
}
305305

306306
impl Printer {
@@ -479,7 +479,7 @@ impl Printer {
479479

480480
Ok(())
481481
}
482-
pub fn check_stack(&mut self, k: int) {
482+
pub fn check_stack(&mut self, k: isize) {
483483
if !self.scan_stack_empty {
484484
let x = self.scan_top();
485485
match self.token[x] {
@@ -506,14 +506,14 @@ impl Printer {
506506
}
507507
}
508508
}
509-
pub fn print_newline(&mut self, amount: int) -> io::IoResult<()> {
509+
pub fn print_newline(&mut self, amount: isize) -> io::IoResult<()> {
510510
debug!("NEWLINE {}", amount);
511511
let ret = write!(self.out, "\n");
512512
self.pending_indentation = 0;
513513
self.indent(amount);
514514
return ret;
515515
}
516-
pub fn indent(&mut self, amount: int) {
516+
pub fn indent(&mut self, amount: isize) {
517517
debug!("INDENT {}", amount);
518518
self.pending_indentation += amount;
519519
}
@@ -536,7 +536,7 @@ impl Printer {
536536
}
537537
write!(self.out, "{}", s)
538538
}
539-
pub fn print(&mut self, token: Token, l: int) -> io::IoResult<()> {
539+
pub fn print(&mut self, token: Token, l: isize) -> io::IoResult<()> {
540540
debug!("print {} {} (remaining line space={})", tok_str(&token), l,
541541
self.space);
542542
debug!("{}", buf_str(&self.token[],
@@ -622,7 +622,7 @@ impl Printer {
622622
// "raw box"
623623
pub fn rbox(p: &mut Printer, indent: usize, b: Breaks) -> io::IoResult<()> {
624624
p.pretty_print(Token::Begin(BeginToken {
625-
offset: indent as int,
625+
offset: indent as isize,
626626
breaks: b
627627
}))
628628
}
@@ -635,10 +635,10 @@ pub fn cbox(p: &mut Printer, indent: usize) -> io::IoResult<()> {
635635
rbox(p, indent, Breaks::Consistent)
636636
}
637637

638-
pub fn break_offset(p: &mut Printer, n: usize, off: int) -> io::IoResult<()> {
638+
pub fn break_offset(p: &mut Printer, n: usize, off: isize) -> io::IoResult<()> {
639639
p.pretty_print(Token::Break(BreakToken {
640640
offset: off,
641-
blank_space: n as int
641+
blank_space: n as isize
642642
}))
643643
}
644644

@@ -651,7 +651,7 @@ pub fn eof(p: &mut Printer) -> io::IoResult<()> {
651651
}
652652

653653
pub fn word(p: &mut Printer, wrd: &str) -> io::IoResult<()> {
654-
p.pretty_print(Token::String(/* bad */ wrd.to_string(), wrd.len() as int))
654+
p.pretty_print(Token::String(/* bad */ wrd.to_string(), wrd.len() as isize))
655655
}
656656

657657
pub fn huge_word(p: &mut Printer, wrd: &str) -> io::IoResult<()> {
@@ -678,7 +678,7 @@ pub fn hardbreak(p: &mut Printer) -> io::IoResult<()> {
678678
spaces(p, SIZE_INFINITY as usize)
679679
}
680680

681-
pub fn hardbreak_tok_offset(off: int) -> Token {
681+
pub fn hardbreak_tok_offset(off: isize) -> Token {
682682
Token::Break(BreakToken {offset: off, blank_space: SIZE_INFINITY})
683683
}
684684

branches/auto/src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ impl<'a> State<'a> {
520520
pub fn bclose_maybe_open (&mut self, span: codemap::Span,
521521
indented: usize, close_box: bool) -> IoResult<()> {
522522
try!(self.maybe_print_comment(span.hi));
523-
try!(self.break_offset_if_not_bol(1u, -(indented as int)));
523+
try!(self.break_offset_if_not_bol(1u, -(indented as isize)));
524524
try!(word(&mut self.s, "}"));
525525
if close_box {
526526
try!(self.end()); // close the outer-box
@@ -568,7 +568,7 @@ impl<'a> State<'a> {
568568
Ok(())
569569
}
570570
pub fn break_offset_if_not_bol(&mut self, n: usize,
571-
off: int) -> IoResult<()> {
571+
off: isize) -> IoResult<()> {
572572
if !self.is_bol() {
573573
break_offset(&mut self.s, n, off)
574574
} else {

branches/auto/src/libsyntax/util/small_vector.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ mod test {
191191

192192
#[test]
193193
fn test_len() {
194-
let v: SmallVector<int> = SmallVector::zero();
194+
let v: SmallVector<isize> = SmallVector::zero();
195195
assert_eq!(0, v.len());
196196

197197
assert_eq!(1, SmallVector::one(1i).len());
@@ -214,7 +214,7 @@ mod test {
214214

215215
#[test]
216216
fn test_from_iter() {
217-
let v: SmallVector<int> = (vec!(1i, 2, 3)).into_iter().collect();
217+
let v: SmallVector<isize> = (vec![1is, 2, 3]).into_iter().collect();
218218
assert_eq!(3, v.len());
219219
assert_eq!(&1, v.get(0));
220220
assert_eq!(&2, v.get(1));
@@ -224,7 +224,7 @@ mod test {
224224
#[test]
225225
fn test_move_iter() {
226226
let v = SmallVector::zero();
227-
let v: Vec<int> = v.into_iter().collect();
227+
let v: Vec<isize> = v.into_iter().collect();
228228
assert_eq!(Vec::new(), v);
229229

230230
let v = SmallVector::one(1i);
@@ -237,7 +237,7 @@ mod test {
237237
#[test]
238238
#[should_fail]
239239
fn test_expect_one_zero() {
240-
let _: int = SmallVector::zero().expect_one("");
240+
let _: isize = SmallVector::zero().expect_one("");
241241
}
242242

243243
#[test]

0 commit comments

Comments
 (0)