Skip to content

Commit 3c6049b

Browse files
committed
---
yaml --- r: 172018 b: refs/heads/beta c: 5a4ca31 h: refs/heads/master v: v3
1 parent 1c26281 commit 3c6049b

File tree

87 files changed

+645
-643
lines changed

Some content is hidden

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

87 files changed

+645
-643
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: abcbe276954525bc7902a5a20762a580d5ed4ea2
34+
refs/heads/beta: 5a4ca319185a3f399986bc5e5a2d0a96fac583ae
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/librustc_resolve/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,14 +834,14 @@ impl PrimitiveTypeTable {
834834
table.intern("f32", TyFloat(TyF32));
835835
table.intern("f64", TyFloat(TyF64));
836836
table.intern("int", TyInt(TyIs));
837-
table.intern("isize", TyInt(TyIs));
837+
table.intern("isize", TyInt(TyIs));
838838
table.intern("i8", TyInt(TyI8));
839839
table.intern("i16", TyInt(TyI16));
840840
table.intern("i32", TyInt(TyI32));
841841
table.intern("i64", TyInt(TyI64));
842842
table.intern("str", TyStr);
843843
table.intern("uint", TyUint(TyUs));
844-
table.intern("usize", TyUint(TyUs));
844+
table.intern("usize", TyUint(TyUs));
845845
table.intern("u8", TyUint(TyU8));
846846
table.intern("u16", TyUint(TyU16));
847847
table.intern("u32", TyUint(TyU32));

branches/beta/src/libsyntax/ast_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn int_ty_max(t: IntTy) -> u64 {
141141
match t {
142142
TyI8 => 0x80u64,
143143
TyI16 => 0x8000u64,
144-
TyIs | TyI32 => 0x80000000u64, // actually ni about TyIm
144+
TyIs | TyI32 => 0x80000000u64, // actually ni about TyIs
145145
TyI64 => 0x8000000000000000u64
146146
}
147147
}
@@ -168,7 +168,7 @@ pub fn uint_ty_max(t: UintTy) -> u64 {
168168
match t {
169169
TyU8 => 0xffu64,
170170
TyU16 => 0xffffu64,
171-
TyUs | TyU32 => 0xffffffffu64, // actually ni about TyUm
171+
TyUs | TyU32 => 0xffffffffu64, // actually ni about TyUs
172172
TyU64 => 0xffffffffffffffffu64
173173
}
174174
}

branches/beta/src/test/compile-fail/array-not-vector.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
let _x: int = [1i, 2, 3]; //~ ERROR expected int, found array of 3 elements
12+
let _x: isize = [1is, 2, 3]; //~ ERROR expected isize, found array of 3 elements
1313

14-
let x: &[int] = &[1, 2, 3];
15-
let _y: &int = x; //~ ERROR expected int, found slice
14+
let x: &[isize] = &[1, 2, 3];
15+
let _y: &isize = x; //~ ERROR expected isize, found slice
1616
}

branches/beta/src/test/compile-fail/associated-types-eq-3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ pub fn baz(x: &Foo<A=Bar>) {
4141

4242
pub fn main() {
4343
let a = 42i;
44-
foo1(a); //~ERROR expected uint, found struct Bar
45-
baz(&a); //~ERROR expected uint, found struct Bar
44+
foo1(a); //~ERROR expected usize, found struct Bar
45+
baz(&a); //~ERROR expected usize, found struct Bar
4646
}

branches/beta/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ trait Foo<T> {
1717
}
1818

1919
fn f<T:Foo<int>>(t: &T) {
20-
let u: <T as Foo<uint>>::Bar = t.get_bar();
21-
//~^ ERROR the trait `Foo<uint>` is not implemented for the type `T`
20+
let u: <T as Foo<usize>>::Bar = t.get_bar();
21+
//~^ ERROR the trait `Foo<usize>` is not implemented for the type `T`
2222
}
2323

2424
fn main() { }

branches/beta/src/test/compile-fail/associated-types-path-2.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,29 @@ pub fn f2<T: Foo>(a: T) -> T::A {
2424
}
2525

2626
pub fn f1_int_int() {
27-
f1(2i, 4i);
28-
//~^ ERROR expected uint, found int
27+
f1(2is, 4is);
28+
//~^ ERROR expected usize, found isize
2929
}
3030

3131
pub fn f1_int_uint() {
32-
f1(2i, 4u);
32+
f1(2is, 4us);
3333
}
3434

3535
pub fn f1_uint_uint() {
36-
f1(2u, 4u);
36+
f1(2us, 4us);
3737
//~^ ERROR the trait `Foo` is not implemented
3838
//~| ERROR the trait `Foo` is not implemented
3939
}
4040

4141
pub fn f1_uint_int() {
42-
f1(2u, 4i);
42+
f1(2us, 4is);
4343
//~^ ERROR the trait `Foo` is not implemented
4444
//~| ERROR the trait `Foo` is not implemented
4545
}
4646

4747
pub fn f2_int() {
48-
let _: int = f2(2i);
49-
//~^ ERROR expected `int`, found `uint`
48+
let _: int = f2(2is);
49+
//~^ ERROR expected `isize`, found `usize`
5050
}
5151

5252
pub fn main() { }

branches/beta/src/test/compile-fail/autoderef-full-lval.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@
99
// except according to those terms.
1010

1111
struct clam {
12-
x: Box<int>,
13-
y: Box<int>,
12+
x: Box<isize>,
13+
y: Box<isize>,
1414
}
1515

1616
struct fish {
17-
a: Box<int>,
17+
a: Box<isize>,
1818
}
1919

2020
fn main() {
2121
let a: clam = clam{x: box 1, y: box 2};
2222
let b: clam = clam{x: box 10, y: box 20};
23-
let z: int = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `Box<int>`
23+
let z: isize = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `Box<isize>`
2424
println!("{}", z);
2525
assert_eq!(z, 21);
2626
let forty: fish = fish{a: box 40};
2727
let two: fish = fish{a: box 2};
2828
let answer: int = forty.a + two.a;
29-
//~^ ERROR binary operation `+` cannot be applied to type `Box<int>`
29+
//~^ ERROR binary operation `+` cannot be applied to type `Box<isize>`
3030
println!("{}", answer);
3131
assert_eq!(answer, 42);
3232
}

branches/beta/src/test/compile-fail/bad-const-type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:expected `collections::string::String`, found `int`
11+
// error-pattern:expected `collections::string::String`, found `isize`
1212

13-
static i: String = 10i;
13+
static i: String = 10is;
1414
fn main() { println!("{}", i); }

branches/beta/src/test/compile-fail/binop-logic-int.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:`&&` cannot be applied to type `int`
11+
// error-pattern:`&&` cannot be applied to type `isize`
1212

13-
fn main() { let x = 1i && 2i; }
13+
fn main() { let x = 1is && 2is; }

branches/beta/src/test/compile-fail/coercion-slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// Tests that we forbid coercion from `[T; n]` to `&[T]`
1212

1313
fn main() {
14-
let _: &[int] = [0i]; //~ERROR: mismatched types: expected `&[int]`, found `[int; 1]`
14+
let _: &[isize] = [0is]; //~ERROR: mismatched types: expected `&[isize]`, found `[isize; 1]`
1515
}

branches/beta/src/test/compile-fail/dst-bad-coerce1.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ struct Foo;
1818
trait Bar {}
1919

2020
pub fn main() {
21-
// With a vec of ints.
21+
// With a vec of isize.
2222
let f1 = Fat { ptr: [1, 2, 3] };
23-
let f2: &Fat<[int; 3]> = &f1;
24-
let f3: &Fat<[uint]> = f2;
25-
//~^ ERROR mismatched types: expected `&Fat<[uint]>`, found `&Fat<[int; 3]>`
23+
let f2: &Fat<[isize; 3]> = &f1;
24+
let f3: &Fat<[usize]> = f2;
25+
//~^ ERROR mismatched types: expected `&Fat<[usize]>`, found `&Fat<[isize; 3]>`
2626

2727
// With a trait.
2828
let f1 = Fat { ptr: Foo };

branches/beta/src/test/compile-fail/dst-bad-coerce4.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ struct Fat<T: ?Sized> {
1515
}
1616

1717
pub fn main() {
18-
// With a vec of ints.
19-
let f1: &Fat<[int]> = &Fat { ptr: [1, 2, 3] };
20-
let f2: &Fat<[int; 3]> = f1;
21-
//~^ ERROR mismatched types: expected `&Fat<[int; 3]>`, found `&Fat<[int]>`
18+
// With a vec of isizes.
19+
let f1: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] };
20+
let f2: &Fat<[isize; 3]> = f1;
21+
//~^ ERROR mismatched types: expected `&Fat<[isize; 3]>`, found `&Fat<[isize]>`
2222
}

branches/beta/src/test/compile-fail/dst-sized-trait-param.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
1616

17-
impl Foo<[int]> for uint { }
18-
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[int]`
17+
impl Foo<[isize]> for uint { }
18+
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[isize]`
1919

20-
impl Foo<int> for [uint] { }
21-
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[uint]`
20+
impl Foo<isize> for [usize] { }
21+
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[usize]`
2222

2323
pub fn main() { }

branches/beta/src/test/compile-fail/fn-trait-formatting.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
#![feature(unboxed_closures)]
1212

13-
fn needs_fn<F>(x: F) where F: Fn(int) -> int {}
13+
fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
1414

1515
fn main() {
16-
let _: () = (box |:_: int| {}) as Box<FnOnce(int)>; //~ ERROR object-safe
17-
//~^ ERROR Box<core::ops::FnOnce(int)>
18-
let _: () = (box |&:_: int, int| {}) as Box<Fn(int, int)>;
19-
//~^ ERROR Box<core::ops::Fn(int, int)>
20-
let _: () = (box |&mut:| -> int unimplemented!()) as Box<FnMut() -> int>;
21-
//~^ ERROR Box<core::ops::FnMut() -> int>
16+
let _: () = (box |:_: isize| {}) as Box<FnOnce(isize)>; //~ ERROR object-safe
17+
//~^ ERROR Box<core::ops::FnOnce(isize)>
18+
let _: () = (box |&:_: isize, isize| {}) as Box<Fn(isize, isize)>;
19+
//~^ ERROR Box<core::ops::Fn(isize, isize)>
20+
let _: () = (box |&mut:| -> isize unimplemented!()) as Box<FnMut() -> isize>;
21+
//~^ ERROR Box<core::ops::FnMut() -> isize>
2222

23-
needs_fn(1i); //~ ERROR `core::ops::Fn(int) -> int`
23+
needs_fn(1i); //~ ERROR `core::ops::Fn(isize) -> isize`
2424
}

branches/beta/src/test/compile-fail/fully-qualified-type-name1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test that we use fully-qualified type names in error messages.
1212

1313
fn main() {
14-
let x: Option<uint>;
14+
let x: Option<usize>;
1515
x = 5;
16-
//~^ ERROR mismatched types: expected `core::option::Option<uint>`
16+
//~^ ERROR mismatched types: expected `core::option::Option<usize>`
1717
}

branches/beta/src/test/compile-fail/fully-qualified-type-name4.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
use std::option::Option;
1414

15-
fn bar(x: uint) -> Option<uint> {
15+
fn bar(x: usize) -> Option<usize> {
1616
return x;
17-
//~^ ERROR mismatched types: expected `core::option::Option<uint>`
17+
//~^ ERROR mismatched types: expected `core::option::Option<usize>`
1818
}
1919

2020
fn main() {

branches/beta/src/test/compile-fail/generic-type-params-name-repr.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ struct HashMap<K, V, H = Hash<K>>;
1818

1919
fn main() {
2020
// Ensure that the printed type doesn't include the default type params...
21-
let _: Foo<int> = ();
22-
//~^ ERROR mismatched types: expected `Foo<int>`, found `()`
21+
let _: Foo<isize> = ();
22+
//~^ ERROR mismatched types: expected `Foo<isize>`, found `()`
2323

2424
// ...even when they're present, but the same types as the defaults.
25-
let _: Foo<int, B, C> = ();
26-
//~^ ERROR mismatched types: expected `Foo<int>`, found `()`
25+
let _: Foo<isize, B, C> = ();
26+
//~^ ERROR mismatched types: expected `Foo<isize>`, found `()`
2727

2828
// Including cases where the default is using previous type params.
29-
let _: HashMap<String, int> = ();
30-
//~^ ERROR mismatched types: expected `HashMap<collections::string::String, int>`, found `()`
31-
let _: HashMap<String, int, Hash<String>> = ();
32-
//~^ ERROR mismatched types: expected `HashMap<collections::string::String, int>`, found `()`
29+
let _: HashMap<String, isize> = ();
30+
//~^ ERROR mismatched types: expected `HashMap<collections::string::String, isize>`, found `()`
31+
let _: HashMap<String, isize, Hash<String>> = ();
32+
//~^ ERROR mismatched types: expected `HashMap<collections::string::String, isize>`, found `()`
3333

3434
// But not when there's a different type in between.
35-
let _: Foo<A, int, C> = ();
36-
//~^ ERROR mismatched types: expected `Foo<A, int>`, found `()`
35+
let _: Foo<A, isize, C> = ();
36+
//~^ ERROR mismatched types: expected `Foo<A, isize>`, found `()`
3737

3838
// And don't print <> at all when there's just defaults.
3939
let _: Foo<A, B, C> = ();

branches/beta/src/test/compile-fail/hrtb-just-for-static.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ trait Foo<X> {
1616
}
1717

1818
fn want_hrtb<T>()
19-
where T : for<'a> Foo<&'a int>
19+
where T : for<'a> Foo<&'a isize>
2020
{
2121
}
2222

23-
// AnyInt implements Foo<&'a int> for any 'a, so it is a match.
23+
// AnyInt implements Foo<&'a isize> for any 'a, so it is a match.
2424
struct AnyInt;
25-
impl<'a> Foo<&'a int> for AnyInt { }
25+
impl<'a> Foo<&'a isize> for AnyInt { }
2626
fn give_any() {
2727
want_hrtb::<AnyInt>()
2828
}
2929

30-
// StaticInt only implements Foo<&'static int>, so it is an error.
30+
// StaticInt only implements Foo<&'static isize>, so it is an error.
3131
struct StaticInt;
32-
impl Foo<&'static int> for StaticInt { }
32+
impl Foo<&'static isize> for StaticInt { }
3333
fn give_static() {
34-
want_hrtb::<StaticInt>() //~ ERROR `for<'a> Foo<&'a int>` is not implemented
34+
want_hrtb::<StaticInt>() //~ ERROR `for<'a> Foo<&'a isize>` is not implemented
3535
}
3636

3737
fn main() { }

branches/beta/src/test/compile-fail/hrtb-perfect-forwarding.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,36 @@ impl<'a,X,F> Bar<X> for &'a mut F
3030
}
3131

3232
fn no_hrtb<'b,T>(mut t: T)
33-
where T : Bar<&'b int>
33+
where T : Bar<&'b isize>
3434
{
35-
// OK -- `T : Bar<&'b int>`, and thus the impl above ensures that
36-
// `&mut T : Bar<&'b int>`.
35+
// OK -- `T : Bar<&'b isize>`, and thus the impl above ensures that
36+
// `&mut T : Bar<&'b isize>`.
3737
no_hrtb(&mut t);
3838
}
3939

4040
fn bar_hrtb<T>(mut t: T)
41-
where T : for<'b> Bar<&'b int>
41+
where T : for<'b> Bar<&'b isize>
4242
{
43-
// OK -- `T : for<'b> Bar<&'b int>`, and thus the impl above
44-
// ensures that `&mut T : for<'b> Bar<&'b int>`. This is an
43+
// OK -- `T : for<'b> Bar<&'b isize>`, and thus the impl above
44+
// ensures that `&mut T : for<'b> Bar<&'b isize>`. This is an
4545
// example of a "perfect forwarding" impl.
4646
bar_hrtb(&mut t);
4747
}
4848

4949
fn foo_hrtb_bar_not<'b,T>(mut t: T)
50-
where T : for<'a> Foo<&'a int> + Bar<&'b int>
50+
where T : for<'a> Foo<&'a isize> + Bar<&'b isize>
5151
{
5252
// Not OK -- The forwarding impl for `Foo` requires that `Bar` also
5353
// be implemented. Thus to satisfy `&mut T : for<'a> Foo<&'a
54-
// int>`, we require `T : for<'a> Bar<&'a int>`, but the where
55-
// clause only specifies `T : Bar<&'b int>`.
56-
foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> Bar<&'a int>` is not implemented for the type `T`
54+
// isize>`, we require `T : for<'a> Bar<&'a isize>`, but the where
55+
// clause only specifies `T : Bar<&'b isize>`.
56+
foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> Bar<&'a isize>` is not implemented for the type `T`
5757
}
5858

5959
fn foo_hrtb_bar_hrtb<T>(mut t: T)
60-
where T : for<'a> Foo<&'a int> + for<'b> Bar<&'b int>
60+
where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>
6161
{
62-
// OK -- now we have `T : for<'b> Bar&'b int>`.
62+
// OK -- now we have `T : for<'b> Bar&'b isize>`.
6363
foo_hrtb_bar_hrtb(&mut t);
6464
}
6565

0 commit comments

Comments
 (0)