Skip to content

Commit a4a8a4a

Browse files
committed
Fixed os:: and int:: not being in scope, changed io::println to println
1 parent cb58b19 commit a4a8a4a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/bench/shootout-binarytrees.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ fn bottom_up_tree<'r>(arena: &'r mut arena::Arena, item: int, depth: int)
4141
}
4242

4343
fn main() {
44-
let args = os::args();
44+
use std::os;
45+
use std::int;
46+
let args = std::os::args();
4547
let args = if os::getenv(~"RUST_BENCH").is_some() {
4648
~[~"", ~"17"]
4749
} else if args.len() <= 1u {
@@ -63,7 +65,7 @@ fn main() {
6365
let stretch_depth = max_depth + 1;
6466
let stretch_tree = bottom_up_tree(&mut stretch_arena, 0, stretch_depth);
6567

66-
io::println(fmt!("stretch tree of depth %d\t check: %d",
68+
println(fmt!("stretch tree of depth %d\t check: %d",
6769
stretch_depth,
6870
item_check(stretch_tree)));
6971

@@ -81,12 +83,12 @@ fn main() {
8183
chk += item_check(temp_tree);
8284
i += 1;
8385
}
84-
io::println(fmt!("%d\t trees of depth %d\t check: %d",
86+
println(fmt!("%d\t trees of depth %d\t check: %d",
8587
iterations * 2, depth,
8688
chk));
8789
depth += 2;
8890
}
89-
io::println(fmt!("long lived trees of depth %d\t check: %d",
91+
println(fmt!("long lived tree of depth %d\t check: %d",
9092
max_depth,
9193
item_check(long_lived_tree)));
9294
}

0 commit comments

Comments
 (0)