Skip to content

Rust upgrade #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub enum ErrorReason {

impl ToStr for SyntaxError {
fn to_str(&self) -> ~str {
fmt!("%u:%u %?", self.location.line, self.location.column, self.reason)
format!("{:u}:{:u} {:?}", self.location.line, self.location.column, self.reason)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That part was already done in c27f837

}
}

Expand Down
10 changes: 6 additions & 4 deletions tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use std::{io, str, run, task};
use std::{str, run, task};
use std::rt::io;
use std::rt::io::Writer;
use extra::{tempfile, json};
use extra::json::ToJson;

use super::*;


fn write_whole_file(path: &Path, data: &str) {
match io::file_writer(path, [io::Create]) {
Ok(writer) => writer.write_str(data),
Err(message) => fail!(message),
match io::file::open(path, io::Create, io::Write) {
Some(mut writer) => writer.write(data.as_bytes()),
None => fail!("could not open file"),
}
}

Expand Down