diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-01-19 10:53:20 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-01-19 11:11:47 -0800 |
| commit | 4e7de69cda8eba7ff807ea002d440b1e37c7b9f4 (patch) | |
| tree | 4c710521d7d1b4d4bf97049e185a4faf992bb79e /src/comp | |
| parent | 5378d5185eccfaba4f7111ed1034ae93d5e2c4d2 (diff) | |
| download | rust-4e7de69cda8eba7ff807ea002d440b1e37c7b9f4.tar.gz rust-4e7de69cda8eba7ff807ea002d440b1e37c7b9f4.zip | |
Partial fix for #1561, doesn't actually "fix" the problem but you get output now.
There's still something wrong with #error here, possibly cross-crate issue.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/driver/driver.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/driver/driver.rs b/src/comp/driver/driver.rs index ea961f917e5..f14d351c4fc 100644 --- a/src/comp/driver/driver.rs +++ b/src/comp/driver/driver.rs @@ -13,7 +13,7 @@ import back::link; import core::{option, str, int, result}; import result::{ok, err}; import std::{fs, io, getopts}; -import io::reader_util; +import io::{reader_util, writer_util}; import option::{some, none}; import getopts::{optopt, optmulti, optflag, optflagopt, opt_present}; import back::{x86, x86_64}; @@ -104,8 +104,8 @@ fn time<T>(do_it: bool, what: str, thunk: fn@() -> T) -> T { let start = std::time::precise_time_s(); let rv = thunk(); let end = std::time::precise_time_s(); - std::io::println(#fmt["time: %s took %s s", what, - float::to_str(end - start, 3u)]); + io::stdout().write_str(#fmt("time: %3.3f s\t%s\n", + end - start, what)); ret rv; } |
