Skip to content

Commit 02c1d2f

Browse files
committed
test: Make all the run-pass tests use pub fn main
1 parent 82a09b9 commit 02c1d2f

File tree

73 files changed

+73
-73
lines changed

Some content is hidden

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

73 files changed

+73
-73
lines changed

src/test/run-pass/borrowck-assign-to-subfield.rs

Lines changed: 1 addition & 1 deletion
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-
fn main() {
11+
pub fn main() {
1212
struct A {
1313
a: int,
1414
w: B,

src/test/run-pass/borrowck-nested-calls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Foo {
2424
}
2525
}
2626

27-
fn main() {
27+
pub fn main() {
2828
let mut f = Foo {a: 22, b: 23};
2929
f.inc_a(f.next_b());
3030
assert_eq!(f.a, 22+23);

src/test/run-pass/builtin-superkinds-capabilities-xc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: Chan<T>) {
2828
chan.send(val);
2929
}
3030

31-
fn main() {
31+
pub fn main() {
3232
let (p,c) = Chan::new();
3333
foo(X(31337), c);
3434
assert!(p.recv() == X(31337));

src/test/run-pass/builtin-superkinds-in-metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ impl <T:Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { }
2626

2727
impl <T:Pod> RequiresPod for X<T> { }
2828

29-
fn main() { }
29+
pub fn main() { }

src/test/run-pass/cfg-macros-foo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ mod foo {
3232
}
3333
}
3434

35-
fn main() {
35+
pub fn main() {
3636
assert!(bar!())
3737
}

src/test/run-pass/cfg-macros-notfoo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ mod foo {
3232
}
3333
}
3434

35-
fn main() {
35+
pub fn main() {
3636
assert!(!bar!())
3737
}

src/test/run-pass/cfg_inner_static.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313

1414
extern mod cfg_inner_static;
1515

16-
fn main() {
16+
pub fn main() {
1717
cfg_inner_static::foo();
1818
}

src/test/run-pass/cfgs-on-items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn foo2() -> int { 2 }
2525
fn foo2() -> int { 3 }
2626

2727

28-
fn main() {
28+
pub fn main() {
2929
assert_eq!(1, foo1());
3030
assert_eq!(3, foo2());
3131
}

src/test/run-pass/conditional-debug-macro-off.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// compile-flags: --cfg ndebug
1313
// exec-env:RUST_LOG=conditional-debug-macro-off=4
1414

15-
fn main() {
15+
pub fn main() {
1616
// only fails if debug! evaluates its argument.
1717
debug!("{:?}", { if true { fail!() } });
1818
}

src/test/run-pass/conditional-debug-macro-on.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast compile-flags directive doesn't work for check-fast
1212
// exec-env:RUST_LOG=conditional-debug-macro-on=4
1313

14-
fn main() {
14+
pub fn main() {
1515
// exits early if debug! evaluates its arguments, otherwise it
1616
// will hit the fail.
1717
debug!("{:?}", { if true { return; } });

0 commit comments

Comments
 (0)