summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-29 17:39:21 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-03 09:32:34 -0800
commitb211b00d21fc7c03c3c378ad5eab60666a00fc08 (patch)
tree233c38ed416d943f5fab0f77664a5d0eb6c15fe6 /src/libsyntax/parse/mod.rs
parentef00c6a278cdd3bd00f44133573e1f5e2e951520 (diff)
downloadrust-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.rs5
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!()
         }
     };