Skip to content

Commit d045231

Browse files
committed
---
yaml --- r: 195057 b: refs/heads/beta c: 43bfaa4 h: refs/heads/master i: 195055: 6bd3bc8 v: v3
1 parent 418a6f8 commit d045231

File tree

1,392 files changed

+5184
-5242
lines changed

Some content is hidden

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

1,392 files changed

+5184
-5242
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 54f16b818b58f6d6e81891b041fc751986e75155
34+
refs/heads/beta: 43bfaa4a336095eb5697fb2df50909fd3c72ed14
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: be7f6ac7008f8ddf980ac07026b05bdd865f29cc

branches/beta/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(int_uint)]
1615
#![feature(old_io)]
1716
#![feature(old_path)]
1817
#![feature(rustc_private)]

branches/beta/src/compiletest/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use std::io::prelude::*;
1515
use std::path::Path;
1616

1717
pub struct ExpectedError {
18-
pub line: uint,
18+
pub line: usize,
1919
pub kind: String,
2020
pub msg: String,
2121
}
2222

2323
#[derive(PartialEq, Debug)]
24-
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
24+
enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
2525

2626
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
2727
/// The former is a "follow" that inherits its target from the preceding line;
@@ -58,8 +58,8 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
5858
}).collect()
5959
}
6060

61-
fn parse_expected(last_nonfollow_error: Option<uint>,
62-
line_num: uint,
61+
fn parse_expected(last_nonfollow_error: Option<usize>,
62+
line_num: usize,
6363
line: &str) -> Option<(WhichLine, ExpectedError)> {
6464
let start = match line.find("//~") { Some(i) => i, None => return None };
6565
let (follow, adjusts) = if line.char_at(start + 3) == '|' {

branches/beta/src/compiletest/header.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
357357
}
358358
}
359359

360-
pub fn gdb_version_to_int(version_string: &str) -> int {
360+
pub fn gdb_version_to_int(version_string: &str) -> isize {
361361
let error_string = format!(
362362
"Encountered GDB version string with unexpected format: {}",
363363
version_string);
@@ -369,17 +369,17 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
369369
panic!("{}", error_string);
370370
}
371371

372-
let major: int = components[0].parse().ok().expect(&error_string);
373-
let minor: int = components[1].parse().ok().expect(&error_string);
372+
let major: isize = components[0].parse().ok().expect(&error_string);
373+
let minor: isize = components[1].parse().ok().expect(&error_string);
374374

375375
return major * 1000 + minor;
376376
}
377377

378-
pub fn lldb_version_to_int(version_string: &str) -> int {
378+
pub fn lldb_version_to_int(version_string: &str) -> isize {
379379
let error_string = format!(
380380
"Encountered LLDB version string with unexpected format: {}",
381381
version_string);
382382
let error_string = error_string;
383-
let major: int = version_string.parse().ok().expect(&error_string);
383+
let major: isize = version_string.parse().ok().expect(&error_string);
384384
return major;
385385
}

branches/beta/src/compiletest/runtest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
758758
struct DebuggerCommands {
759759
commands: Vec<String>,
760760
check_lines: Vec<String>,
761-
breakpoint_lines: Vec<uint>,
761+
breakpoint_lines: Vec<usize>,
762762
}
763763

764764
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -1036,7 +1036,7 @@ fn is_compiler_error_or_warning(line: &str) -> bool {
10361036
scan_string(line, "warning", &mut i));
10371037
}
10381038

1039-
fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1039+
fn scan_until_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10401040
if *idx >= haystack.len() {
10411041
return false;
10421042
}
@@ -1048,7 +1048,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10481048
return true;
10491049
}
10501050

1051-
fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1051+
fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10521052
if *idx >= haystack.len() {
10531053
return false;
10541054
}
@@ -1060,7 +1060,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10601060
return true;
10611061
}
10621062

1063-
fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
1063+
fn scan_integer(haystack: &str, idx: &mut usize) -> bool {
10641064
let mut i = *idx;
10651065
while i < haystack.len() {
10661066
let ch = haystack.char_at(i);
@@ -1076,7 +1076,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10761076
return true;
10771077
}
10781078

1079-
fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
1079+
fn scan_string(haystack: &str, needle: &str, idx: &mut usize) -> bool {
10801080
let mut haystack_i = *idx;
10811081
let mut needle_i = 0;
10821082
while needle_i < needle.len() {
@@ -1725,7 +1725,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
17251725
}
17261726

17271727

1728-
fn count_extracted_lines(p: &Path) -> uint {
1728+
fn count_extracted_lines(p: &Path) -> usize {
17291729
let mut x = Vec::new();
17301730
File::open(&p.with_extension("ll")).unwrap().read_to_end(&mut x).unwrap();
17311731
let x = str::from_utf8(&x).unwrap();

branches/beta/src/doc/reference.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,9 +2440,6 @@ The currently implemented features of the reference compiler are:
24402440
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
24412441
are inherently unstable and no promise about them is made.
24422442

2443-
* `int_uint` - Allows the use of the `int` and `uint` types, which are deprecated.
2444-
Use `isize` and `usize` instead.
2445-
24462443
* `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`,
24472444
lang items are inherently unstable and no promise about them
24482445
is made.
@@ -2759,7 +2756,7 @@ The following are examples of structure expressions:
27592756
```
27602757
# struct Point { x: f64, y: f64 }
27612758
# struct TuplePoint(f64, f64);
2762-
# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: uint } }
2759+
# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: usize } }
27632760
# struct Cookie; fn some_fn<T>(t: T) {}
27642761
Point {x: 10.0, y: 20.0};
27652762
TuplePoint(10.0, 20.0);
@@ -3402,7 +3399,7 @@ subpattern`. For example:
34023399
#![feature(box_patterns)]
34033400
#![feature(box_syntax)]
34043401
3405-
enum List { Nil, Cons(uint, Box<List>) }
3402+
enum List { Nil, Cons(u32, Box<List>) }
34063403
34073404
fn is_sorted(list: &List) -> bool {
34083405
match *list {

branches/beta/src/doc/trpl/ffi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Unsafe functions, on the other hand, advertise it to the world. An unsafe functi
401401
this:
402402

403403
```
404-
unsafe fn kaboom(ptr: *const int) -> int { *ptr }
404+
unsafe fn kaboom(ptr: *const i32) -> i32 { *ptr }
405405
```
406406

407407
This function can only be called from an `unsafe` block or another `unsafe` function.
@@ -423,7 +423,7 @@ extern {
423423
424424
fn main() {
425425
println!("You have readline version {} installed.",
426-
rl_readline_version as int);
426+
rl_readline_version as i32);
427427
}
428428
```
429429

branches/beta/src/doc/trpl/more-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ need, and it can make your lifetimes more complex.
129129
To write a function that's generic over types of strings, use `&str`.
130130

131131
```
132-
fn some_string_length(x: &str) -> uint {
132+
fn some_string_length(x: &str) -> usize {
133133
x.len()
134134
}
135135

branches/beta/src/libcore/atomic.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ pub fn fence(order: Ordering) {
10641064
reason = "renamed to AtomicIsize")]
10651065
#[allow(missing_docs)]
10661066
pub struct AtomicInt {
1067-
v: UnsafeCell<int>,
1067+
v: UnsafeCell<isize>,
10681068
}
10691069

10701070
#[allow(deprecated)]
@@ -1075,7 +1075,7 @@ unsafe impl Sync for AtomicInt {}
10751075
reason = "renamed to AtomicUsize")]
10761076
#[allow(missing_docs)]
10771077
pub struct AtomicUint {
1078-
v: UnsafeCell<uint>,
1078+
v: UnsafeCell<usize>,
10791079
}
10801080

10811081
#[allow(deprecated)]
@@ -1097,105 +1097,105 @@ pub const ATOMIC_UINT_INIT: AtomicUint =
10971097
#[allow(missing_docs, deprecated)]
10981098
impl AtomicInt {
10991099
#[inline]
1100-
pub fn new(v: int) -> AtomicInt {
1100+
pub fn new(v: isize) -> AtomicInt {
11011101
AtomicInt {v: UnsafeCell::new(v)}
11021102
}
11031103

11041104
#[inline]
1105-
pub fn load(&self, order: Ordering) -> int {
1105+
pub fn load(&self, order: Ordering) -> isize {
11061106
unsafe { atomic_load(self.v.get(), order) }
11071107
}
11081108

11091109
#[inline]
1110-
pub fn store(&self, val: int, order: Ordering) {
1110+
pub fn store(&self, val: isize, order: Ordering) {
11111111
unsafe { atomic_store(self.v.get(), val, order); }
11121112
}
11131113

11141114
#[inline]
1115-
pub fn swap(&self, val: int, order: Ordering) -> int {
1115+
pub fn swap(&self, val: isize, order: Ordering) -> isize {
11161116
unsafe { atomic_swap(self.v.get(), val, order) }
11171117
}
11181118

11191119
#[inline]
1120-
pub fn compare_and_swap(&self, old: int, new: int, order: Ordering) -> int {
1120+
pub fn compare_and_swap(&self, old: isize, new: isize, order: Ordering) -> isize {
11211121
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
11221122
}
11231123

11241124
#[inline]
1125-
pub fn fetch_add(&self, val: int, order: Ordering) -> int {
1125+
pub fn fetch_add(&self, val: isize, order: Ordering) -> isize {
11261126
unsafe { atomic_add(self.v.get(), val, order) }
11271127
}
11281128

11291129
#[inline]
1130-
pub fn fetch_sub(&self, val: int, order: Ordering) -> int {
1130+
pub fn fetch_sub(&self, val: isize, order: Ordering) -> isize {
11311131
unsafe { atomic_sub(self.v.get(), val, order) }
11321132
}
11331133

11341134
#[inline]
1135-
pub fn fetch_and(&self, val: int, order: Ordering) -> int {
1135+
pub fn fetch_and(&self, val: isize, order: Ordering) -> isize {
11361136
unsafe { atomic_and(self.v.get(), val, order) }
11371137
}
11381138

11391139
#[inline]
1140-
pub fn fetch_or(&self, val: int, order: Ordering) -> int {
1140+
pub fn fetch_or(&self, val: isize, order: Ordering) -> isize {
11411141
unsafe { atomic_or(self.v.get(), val, order) }
11421142
}
11431143

11441144
#[inline]
1145-
pub fn fetch_xor(&self, val: int, order: Ordering) -> int {
1145+
pub fn fetch_xor(&self, val: isize, order: Ordering) -> isize {
11461146
unsafe { atomic_xor(self.v.get(), val, order) }
11471147
}
11481148
}
11491149

11501150
#[allow(missing_docs, deprecated)]
11511151
impl AtomicUint {
11521152
#[inline]
1153-
pub fn new(v: uint) -> AtomicUint {
1153+
pub fn new(v: usize) -> AtomicUint {
11541154
AtomicUint { v: UnsafeCell::new(v) }
11551155
}
11561156

11571157
#[inline]
1158-
pub fn load(&self, order: Ordering) -> uint {
1158+
pub fn load(&self, order: Ordering) -> usize {
11591159
unsafe { atomic_load(self.v.get(), order) }
11601160
}
11611161

11621162
#[inline]
1163-
pub fn store(&self, val: uint, order: Ordering) {
1163+
pub fn store(&self, val: usize, order: Ordering) {
11641164
unsafe { atomic_store(self.v.get(), val, order); }
11651165
}
11661166

11671167
#[inline]
1168-
pub fn swap(&self, val: uint, order: Ordering) -> uint {
1168+
pub fn swap(&self, val: usize, order: Ordering) -> usize {
11691169
unsafe { atomic_swap(self.v.get(), val, order) }
11701170
}
11711171

11721172
#[inline]
1173-
pub fn compare_and_swap(&self, old: uint, new: uint, order: Ordering) -> uint {
1173+
pub fn compare_and_swap(&self, old: usize, new: usize, order: Ordering) -> usize {
11741174
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
11751175
}
11761176

11771177
#[inline]
1178-
pub fn fetch_add(&self, val: uint, order: Ordering) -> uint {
1178+
pub fn fetch_add(&self, val: usize, order: Ordering) -> usize {
11791179
unsafe { atomic_add(self.v.get(), val, order) }
11801180
}
11811181

11821182
#[inline]
1183-
pub fn fetch_sub(&self, val: uint, order: Ordering) -> uint {
1183+
pub fn fetch_sub(&self, val: usize, order: Ordering) -> usize {
11841184
unsafe { atomic_sub(self.v.get(), val, order) }
11851185
}
11861186

11871187
#[inline]
1188-
pub fn fetch_and(&self, val: uint, order: Ordering) -> uint {
1188+
pub fn fetch_and(&self, val: usize, order: Ordering) -> usize {
11891189
unsafe { atomic_and(self.v.get(), val, order) }
11901190
}
11911191

11921192
#[inline]
1193-
pub fn fetch_or(&self, val: uint, order: Ordering) -> uint {
1193+
pub fn fetch_or(&self, val: usize, order: Ordering) -> usize {
11941194
unsafe { atomic_or(self.v.get(), val, order) }
11951195
}
11961196

11971197
#[inline]
1198-
pub fn fetch_xor(&self, val: uint, order: Ordering) -> uint {
1198+
pub fn fetch_xor(&self, val: usize, order: Ordering) -> usize {
11991199
unsafe { atomic_xor(self.v.get(), val, order) }
12001200
}
12011201
}

branches/beta/src/libcore/fmt/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
125125
// otherwise as well.
126126
let mut buf = [0; 1536];
127127
let mut end = 0;
128-
let radix_gen: T = cast(radix as int).unwrap();
128+
let radix_gen: T = cast(radix as isize).unwrap();
129129

130130
let (num, exp) = match exp_format {
131131
ExpNone => (num, 0),
@@ -235,7 +235,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
235235
let extra_digit = ascii2value(buf[end - 1]);
236236
end -= 1;
237237
if extra_digit >= radix / 2 { // -> need to round
238-
let mut i: int = end as int - 1;
238+
let mut i: isize = end as isize - 1;
239239
loop {
240240
// If reached left end of number, have to
241241
// insert additional digit:

branches/beta/src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ extern "rust-intrinsic" {
315315
/// # #![feature(core)]
316316
/// use std::ptr;
317317
///
318-
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: uint) -> Vec<T> {
318+
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> {
319319
/// let mut dst = Vec::with_capacity(elts);
320320
/// dst.set_len(elts);
321321
/// ptr::copy(dst.as_mut_ptr(), ptr, elts);

branches/beta/src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#![allow(raw_pointer_derive)]
6464
#![deny(missing_docs)]
6565

66-
#![feature(int_uint)]
6766
#![feature(intrinsics, lang_items)]
6867
#![feature(on_unimplemented)]
6968
#![feature(simd, unsafe_destructor)]

branches/beta/src/libcore/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ macro_rules! writeln {
218218
/// Match arms:
219219
///
220220
/// ```
221-
/// fn foo(x: Option<int>) {
221+
/// fn foo(x: Option<i32>) {
222222
/// match x {
223223
/// Some(n) if n >= 0 => println!("Some(Non-negative)"),
224224
/// Some(n) if n < 0 => println!("Some(Negative)"),

0 commit comments

Comments
 (0)