check-fast fallout from removing export, r=burningtree

This commit is contained in:
Graydon Hoare 2013-02-01 19:43:17 -08:00
parent e5e52d2437
commit 89c8ef792f
1073 changed files with 1083 additions and 1083 deletions

View File

@ -20,4 +20,4 @@ fn mk_raw_ty(st: sty, cname: Option<~str>) -> RawT {
return RawT {struct_: st, cname: cname, hash: 0u};
}
fn main() { mk_raw_ty(ty_nil, None::<~str>); }
pub fn main() { mk_raw_ty(ty_nil, None::<~str>); }

View File

@ -16,7 +16,7 @@ fn f<A:Copy &static>(a: A, b: u16) -> fn@() -> (A, u16) {
fn@() -> (A, u16) { (a, b) }
}
fn main() {
pub fn main() {
let (a, b) = f(22_u64, 44u16)();
debug!("a=%? b=%?", a, b);
assert a == 22u64;

View File

@ -27,7 +27,7 @@ fn f<A:Owned Copy, B:Owned Copy>(a: A, b: B) -> fn@() -> (A, B) {
fn@() -> (A, B) { (a, b) }
}
fn main() {
pub fn main() {
let x = 22_u8;
let y = 44_u64;
let z = f(~x, y);

View File

@ -14,4 +14,4 @@ struct R<T> {mut v: ~[option<T>]}
fn f<T>() -> ~[T] { return ~[]; }
fn main() { let r: R<int> = R {mut v: ~[]}; r.v = f(); }
pub fn main() { let r: R<int> = R {mut v: ~[]}; r.v = f(); }

View File

@ -33,7 +33,7 @@ fn g2(ref_1: &str, ref_2: &str) {
}
}
fn main() {
pub fn main() {
f1(@"a");
f1(~"b");
f1(&"c");

View File

@ -10,4 +10,4 @@
// n.b. This was only ever failing with optimization disabled.
fn a() -> int { match return 1 { 2 => 3, _ => die!() } }
fn main() { a(); }
pub fn main() { a(); }

View File

@ -9,7 +9,7 @@
// except according to those terms.
fn main() {
pub fn main() {
let i: int =
match Some::<int>(3) { None::<int> => { die!() } Some::<int>(_) => { 5 } };
log(debug, i);

View File

@ -10,7 +10,7 @@
struct Pair { mut a: ~int, mut b: ~int }
fn main() {
pub fn main() {
let x = ~Pair {mut a: ~10, b: ~20};
match x {
~Pair {a: ref mut a, b: ref b} => {

View File

@ -28,4 +28,4 @@ fn foo<T>(y: Option<T>) {
return;
}
fn main() { debug!("hello"); foo::<int>(Some::<int>(5)); }
pub fn main() { debug!("hello"); foo::<int>(Some::<int>(5)); }

View File

@ -10,7 +10,7 @@
struct X { x: int }
fn main() {
pub fn main() {
let x = match 0 {
_ => X {
x: 0

View File

@ -10,7 +10,7 @@
struct X { x: int }
fn main() {
pub fn main() {
let x = match 0 {
_ => X {
x: 0

View File

@ -16,4 +16,4 @@ mod m1 {
fn bar(x: m1::foo) { match x { m1::foo1 => { } m1::foo2 => { } } }
fn main() { }
pub fn main() { }

View File

@ -29,7 +29,7 @@ fn foo(s: @int) {
let _ = ::core::sys::refcount(s); // don't get bitten by last-use.
}
fn main() {
pub fn main() {
let s: @int = @0; // ref up
let count = ::core::sys::refcount(s);

View File

@ -18,4 +18,4 @@ fn altlit(f: int) -> int {
}
}
fn main() { assert (altlit(10) == 20); assert (altlit(11) == 22); }
pub fn main() { assert (altlit(10) == 20); assert (altlit(11) == 22); }

View File

@ -14,4 +14,4 @@ fn foo(x: maybe<int>) {
match x { nothing => { error!("A"); } just(a) => { error!("B"); } }
}
fn main() { }
pub fn main() { }

View File

@ -12,4 +12,4 @@
fn altsimple(f: int) { match f { x => () } }
fn main() { }
pub fn main() { }

View File

@ -14,7 +14,7 @@ enum thing { a, b, c, }
fn foo(it: fn(int)) { it(10); }
fn main() {
pub fn main() {
let mut x = true;
match a {
a => { x = true; foo(|_i| { } ) }

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
match 5u {
1u..5u => {}
_ => die!(~"should match range"),

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let x = Some(private::exclusive(true));
match move x {
Some(ref z) if z.with(|b| *b) => {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let mut v = Some(22);
match v {
None => {}

View File

@ -18,7 +18,7 @@ fn destructure(x: &mut Rec) {
}
}
fn main() {
pub fn main() {
let mut v = Rec {f: 22};
destructure(&mut v);
assert v.f == 23;

View File

@ -15,6 +15,6 @@ fn destructure(x: Option<int>) -> int {
}
}
fn main() {
pub fn main() {
assert destructure(Some(22)) == 22;
}

View File

@ -10,7 +10,7 @@
// Issue #53
fn main() {
pub fn main() {
match ~"test" { ~"not-test" => die!(), ~"test" => (), _ => die!() }
enum t { tag1(~str), tag2, }

View File

@ -28,7 +28,7 @@ fn process(c: color) -> int {
return x;
}
fn main() {
pub fn main() {
let gray: color = rgb(127, 127, 127);
let clear: color = rgba(50, 150, 250, 0);
let red: color = hsl(0, 255, 255);

View File

@ -8,7 +8,7 @@ fn altsimple(any x) {
}
}
fn main() {
pub fn main() {
altsimple(5);
altsimple("asdfasdfsDF");
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
match ~100 {
~x => {
debug!("%?", x);

View File

@ -16,7 +16,7 @@ fn foo(x: Option<~int>, b: bool) -> int {
}
}
fn main() {
pub fn main() {
foo(Some(~22), true);
foo(Some(~22), false);
foo(None, true);

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
// sometimes we have had trouble finding
// the right type for f, as we unified
// bot and u32 here

View File

@ -14,6 +14,6 @@ extern mod anonexternmod;
use anonexternmod::*;
fn main() {
pub fn main() {
last_os_error();
}

View File

@ -14,7 +14,7 @@ extern {
fn last_os_error() -> ~str;
}
fn main() {
pub fn main() {
unsafe {
let _ = last_os_error();
}

View File

@ -18,7 +18,7 @@ impl Foo {
}
}
fn main() {
pub fn main() {
let x = Foo::new();
io::println(x.x.to_str());
}

View File

@ -14,7 +14,7 @@
extern mod anon_trait_static_method_lib;
use anon_trait_static_method_lib::Foo;
fn main() {
pub fn main() {
let x = Foo::new();
io::println(x.x.to_str());
}

View File

@ -22,7 +22,7 @@ fn f1(a: X, b: &mut int, -c: int) -> int {
fn f2(a: int, f: fn(int)) -> int { f(1); return a; }
fn main() {
pub fn main() {
let mut a = X {mut x: 1}, b = 2, c = 3;
assert (f1(a, &mut b, move c) == 6);
assert (a.x == 0);

View File

@ -10,7 +10,7 @@
fn main() {
pub fn main() {
let a: int = 10;
log(debug, a);
assert (a * (a - 1) == 90);

View File

@ -10,7 +10,7 @@
fn main() {
pub fn main() {
let i32_a: int = 10;
assert (i32_a == 10);
assert (i32_a - 10 == 0);

View File

@ -10,7 +10,7 @@
fn main() {
pub fn main() {
let i32_c: int = 0x10101010;
assert (i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3) ==
i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3));

View File

@ -12,7 +12,7 @@
// Unsigned integer operations
fn main() {
pub fn main() {
assert (0u8 < 255u8);
assert (0u8 <= 255u8);
assert (255u8 > 0u8);

View File

@ -10,4 +10,4 @@
fn f() -> int { { return 3; } }
fn main() { assert (f() == 3); }
pub fn main() { assert (f() == 3); }

View File

@ -29,4 +29,4 @@ fn test_assign_op() {
assert (x == 33);
}
fn main() { test_assign(); test_assign_op(); }
pub fn main() { test_assign(); test_assign_op(); }

View File

@ -38,7 +38,7 @@ fn length<A, T: iterable<A>>(x: T) -> uint {
return len;
}
fn main() {
pub fn main() {
let x = ~[0,1,2,3];
// Call a method
for x.iterate() |y| { assert x[*y] == *y; }

View File

@ -13,5 +13,5 @@
#[foo = "bar"]
extern mod std;
fn main() {
pub fn main() {
}

View File

@ -15,5 +15,5 @@ mod m {
extern mod std;
}
fn main() {
pub fn main() {
}

View File

@ -10,7 +10,7 @@
// xfail-fast
fn main() {
pub fn main() {
die!()
}

View File

@ -158,7 +158,7 @@ enum Quark<T> {
#[auto_decode]
enum CLike { A, B, C }
fn main() {
pub fn main() {
let a = &Plus(@Minus(@Val(3u), @Val(10u)), @Plus(@Val(22u), @Val(5u)));
test_prettyprint(a, &~"Plus(@Minus(@Val(3u), @Val(10u)), \
@Plus(@Val(22u), @Val(5u)))");

View File

@ -18,7 +18,7 @@ struct Triple { x: int, y: int, z: int }
fn f<T: Copy, U: Copy>(x: T, y: U) -> Pair<T, U> { return Pair {a: x, b: y}; }
fn main() {
pub fn main() {
log(debug, f(Triple {x: 3, y: 4, z: 5}, 4).a.x);
log(debug, f(5, 6).a);
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let mut sum = 0;
for vec::each(~[1, 2, 3, 4, 5]) |x| {
sum += *x;

View File

@ -32,7 +32,7 @@ impl Bar : Baz {
}
}
fn main() {
pub fn main() {
let y = Bar { x: 42 };
y.f();
}

View File

@ -17,7 +17,7 @@ impl Foo {
fn len(&self) -> uint { **self }
}
fn main() {
pub fn main() {
let m = Foo(3);
assert m.len() == 3;
}

View File

@ -26,7 +26,7 @@ impl &str: MyIter {
pure fn test_const(&const self) { assert *self == "test" }
}
fn main() {
pub fn main() {
// NB: Associativity of ~, etc. in this context is surprising. These must be parenthesized
([1]).test_imm();

View File

@ -18,7 +18,7 @@ impl<T> ~[T]: Pushable<T> {
}
}
fn main() {
pub fn main() {
let mut v = ~[1];
v.push_val(2);
v.push_val(3);

View File

@ -22,7 +22,7 @@ impl &Foo : Stuff {
}
}
fn main() {
pub fn main() {
let x = Foo { x: 3 };
x.printme();
}

View File

@ -12,7 +12,7 @@ fn f<T: Copy>(x: ~[T]) -> T { return x[0]; }
fn g(act: fn(~[int]) -> int) -> int { return act(~[1, 2, 3]); }
fn main() {
pub fn main() {
assert (g(f) == 1);
let f1: fn(~[~str]) -> ~str = f;
assert (f1(~[~"x", ~"y", ~"z"]) == ~"x");

View File

@ -20,6 +20,6 @@ fn g(x: &mut Foo) {
x.f();
}
fn main() {
pub fn main() {
}

View File

@ -18,7 +18,7 @@ impl uint: double {
enum foo = uint;
fn main() {
pub fn main() {
let x = foo(3u);
assert x.double() == 6u;
}

View File

@ -20,7 +20,7 @@ fn is_equal<D: double>(x: @D, exp: uint) {
assert x.double() == exp;
}
fn main() {
pub fn main() {
let x = @(3u as double);
is_equal(x, 6);
}

View File

@ -16,7 +16,7 @@ impl uint: double {
fn double() -> uint { self * 2u }
}
fn main() {
pub fn main() {
let x = @(3u as double);
assert x.double() == 6u;
}

View File

@ -20,7 +20,7 @@ impl @uint: double {
fn double() -> uint { *self * 2u }
}
fn main() {
pub fn main() {
let x = @3u;
assert x.double() == 6u;
}

View File

@ -16,7 +16,7 @@ impl @@uint: double {
fn double() -> uint { **self * 2u }
}
fn main() {
pub fn main() {
let x = @@@@@3u;
assert x.double() == 6u;
}

View File

@ -16,7 +16,7 @@ impl uint: double {
fn double() -> uint { self * 2u }
}
fn main() {
pub fn main() {
let x = @@3u;
assert x.double() == 6u;
}

View File

@ -16,7 +16,7 @@ impl uint: double {
fn double() -> uint { self * 2u }
}
fn main() {
pub fn main() {
let x = @3u;
assert x.double() == 6u;
}

View File

@ -24,7 +24,7 @@ impl uint: Foo {
}
}
fn main() {
pub fn main() {
let x = @3u;
assert x.foo() == ~"@3";
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let x: &static/str = "foo";
io::println(x);
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
assert 0xffffffffu32 == (-1 as u32);
assert 4294967295u32 == (-1 as u32);
assert 0xffffffffffffffffu64 == (-1 as u64);

View File

@ -10,7 +10,7 @@
// Check that issue #954 stays fixed
fn main() {
pub fn main() {
match -1 { -1 => {}, _ => die!(~"wat") }
assert 1-1 == 0;
}

View File

@ -14,7 +14,7 @@ extern mod std;
use std::arc;
fn dispose(+_x: arc::ARC<bool>) unsafe { }
fn main() {
pub fn main() {
let p = arc::arc(true);
let x = Some(p);
match move x {

View File

@ -121,7 +121,7 @@ fn test_class() {
assert(q != r);
}
fn main() {
pub fn main() {
test_nil();
test_bool();
test_char();

View File

@ -20,6 +20,6 @@ fn bitv_test() -> bool {
true
}
fn main() {
pub fn main() {
do iter::repeat(10000) || {bitv_test()};
}

View File

@ -38,7 +38,7 @@ fn general() {
assert (0b1010_1010 | 0b0101_0101 == 0xff);
}
fn main() {
pub fn main() {
general();
target();
}

View File

@ -26,7 +26,7 @@ fn asAny( f : fn()->uint ) -> uint {
return f();
}
fn main() {
pub fn main() {
let x = asSendfn(|| 22u);
assert(x == 22u);
let x = asLambda(|| 22u);

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let v = ~[-1f, 0f, 1f, 2f, 3f];
// Trailing expressions don't require parentheses:

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
fn f(i: fn() -> uint) -> uint { i() }
let v = ~[-1f, 0f, 1f, 2f, 3f];
let z = do do vec::foldl(f, v) |x, _y| { x } { 22u };

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
fn f(i: uint) -> uint { i }
let v = ~[-1f, 0f, 1f, 2f, 3f];
let z = do vec::foldl(f, v) |x, _y| { x } (22u);

View File

@ -27,7 +27,7 @@ fn w_ret(v: ~[int]) -> int {
return do vec::foldl(0, v) |x,y| { x+*y } - 10;
}
fn main() {
pub fn main() {
assert w_semi(~[0, 1, 2, 3]) == -10;
assert w_paren1(~[0, 1, 2, 3]) == -4;
assert w_paren2(~[0, 1, 2, 3]) == -4;

View File

@ -12,7 +12,7 @@ fn call_any(f: fn() -> uint) -> uint {
return f();
}
fn main() {
pub fn main() {
let x_r = do call_any { 22u };
assert x_r == 22u;
}

View File

@ -12,7 +12,7 @@ fn to_lambda(f: fn@(uint) -> uint) -> fn@(uint) -> uint {
return f;
}
fn main() {
pub fn main() {
let x: fn@(uint) -> uint = to_lambda(|x| x * 2u );
let y = to_lambda(x);

View File

@ -9,7 +9,7 @@
// except according to those terms.
// Check usage and precedence of block arguments in expressions:
fn main() {
pub fn main() {
let v = ~[-1f, 0f, 1f, 2f, 3f];
// Statement form does not require parentheses:

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
fn as_buf<T>(s: ~str, f: fn(~str) -> T) -> T { f(s) }
as_buf(~"foo", |foo: ~str| -> () log(error, foo) );
}

View File

@ -54,7 +54,7 @@
*
*/
fn main() {
pub fn main() {
let num = 12;

View File

@ -9,7 +9,7 @@
// except according to those terms.
fn force(f: fn() -> int) -> int { return f(); }
fn main() {
pub fn main() {
fn f() -> int { return 7; }
assert (force(f) == 7);
let g = {||force(f)};

View File

@ -13,7 +13,7 @@
fn iter_vec<T>(v: ~[T], f: fn(T)) { for v.each |x| { f(*x); } }
fn main() {
pub fn main() {
let v = ~[1, 2, 3, 4, 5, 6, 7];
let mut odds = 0;
iter_vec(v, |i| {

View File

@ -13,7 +13,7 @@
fn iter_vec<T>(v: ~[T], f: fn(T)) { for v.each |x| { f(*x); } }
fn main() {
pub fn main() {
let v = ~[1, 2, 3, 4, 5];
let mut sum = 0;
iter_vec(copy v, |i| {

View File

@ -10,7 +10,7 @@
extern mod std;
fn main() {
pub fn main() {
let v =
vec::map2(~[1, 2, 3, 4, 5],
~[true, false, false, true, true],

View File

@ -12,7 +12,7 @@
// -*- rust -*-
fn main() {
pub fn main() {
if !false { assert (true); } else { assert (false); }
if !true { assert (false); } else { assert (true); }
}

View File

@ -16,7 +16,7 @@ impl &[int]: Foo {
fn foo(self) {}
}
fn main() {
pub fn main() {
let items = ~[ 3, 5, 1, 2, 4 ];
items.foo();
}

View File

@ -13,7 +13,7 @@ struct F { mut f: ~[int] }
fn impure(_v: &[int]) {
}
fn main() {
pub fn main() {
let x = F {f: ~[3]};
match x {

View File

@ -14,7 +14,7 @@ fn sum_slice(x: &[int]) -> int {
return sum;
}
fn main() {
pub fn main() {
let x = @[1, 2, 3];
assert sum_slice(x) == 6;
}

View File

@ -20,6 +20,6 @@ fn test1(x: @~int) {
}
}
fn main() {
pub fn main() {
test1(@~22);
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let x = [22];
let y = &x[0];
assert *y == 22;

View File

@ -30,5 +30,5 @@ fn borrow_from_arg_val(++v: ~int) {
borrow(v);
}
fn main() {
pub fn main() {
}

View File

@ -17,5 +17,5 @@ fn bar(x: *~int) -> ~int {
}
}
fn main() {
pub fn main() {
}

View File

@ -23,7 +23,7 @@ fn iter_ints(x: &Ints, f: fn(x: &int) -> bool) {
uint::range(0, l, |i| f(&x.values[i]))
}
fn main() {
pub fn main() {
let mut ints = ~Ints {sum: ~0, values: ~[]};
add_int(ints, 22);
add_int(ints, 44);

View File

@ -18,6 +18,6 @@ fn has_mut_vec(+v: ~[mut int]) -> int {
want_slice(v)
}
fn main() {
pub fn main() {
assert has_mut_vec(~[mut 1, 2, 3]) == 6;
}

View File

@ -27,4 +27,4 @@ fn really_impure(++bar: baz) {
bar.baz = 3;
}
fn main() {}
pub fn main() {}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
pub fn main() {
let mut x = None;
match x {
None => {

View File

@ -10,7 +10,7 @@
// exec-env:RUST_POISON_ON_FREE=1
fn main() {
pub fn main() {
let x: @mut @Option<~int> = @mut @None;
match x {
@@Some(ref y) => {

View File

@ -12,7 +12,7 @@
struct F { f: ~int }
fn main() {
pub fn main() {
let mut x = @F {f: ~3};
match x {
@F {f: ref b_x} => {

View File

@ -19,7 +19,7 @@ fn borrow(x: &int, f: fn(x: &int)) {
struct F { f: ~int }
fn main() {
pub fn main() {
let mut x = @F {f: ~3};
do borrow(x.f) |b_x| {
assert *b_x == 3;

View File

@ -12,7 +12,7 @@
struct F { f: ~int }
fn main() {
pub fn main() {
let mut x = @mut @F {f: ~3};
match x {
@@F{f: ref b_x} => {

View File

@ -19,7 +19,7 @@ fn borrow(x: &int, f: fn(x: &int)) {
struct F { f: ~int }
fn main() {
pub fn main() {
let mut x = ~mut @F{f: ~3};
do borrow(x.f) |b_x| {
assert *b_x == 3;

View File

@ -18,7 +18,7 @@ fn switcher(x: Option<@int>) {
}
}
fn main() {
pub fn main() {
switcher(None);
switcher(Some(@3));
}

Some files were not shown because too many files have changed in this diff Show More