diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-01-29 17:39:21 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-03 09:32:34 -0800 |
| commit | b211b00d21fc7c03c3c378ad5eab60666a00fc08 (patch) | |
| tree | 233c38ed416d943f5fab0f77664a5d0eb6c15fe6 /src/libsyntax/parse/mod.rs | |
| parent | ef00c6a278cdd3bd00f44133573e1f5e2e951520 (diff) | |
| download | rust-b211b00d21fc7c03c3c378ad5eab60666a00fc08.tar.gz rust-b211b00d21fc7c03c3c378ad5eab60666a00fc08.zip | |
syntax: Remove io_error usage
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index cec9f7c2d9f..328f0e7f221 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -19,7 +19,6 @@ use parse::attr::ParserAttr; use parse::parser::Parser; use std::cell::RefCell; -use std::io; use std::io::File; use std::str; @@ -232,10 +231,10 @@ pub fn file_to_filemap(sess: @ParseSess, path: &Path, spanopt: Option<Span>) None => sess.span_diagnostic.handler().fatal(msg), } }; - let bytes = match io::result(|| File::open(path).read_to_end()) { + let bytes = match File::open(path).read_to_end() { Ok(bytes) => bytes, Err(e) => { - err(format!("couldn't read {}: {}", path.display(), e.desc)); + err(format!("couldn't read {}: {}", path.display(), e)); unreachable!() } }; |
