From b211b00d21fc7c03c3c378ad5eab60666a00fc08 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 29 Jan 2014 17:39:21 -0800 Subject: syntax: Remove io_error usage --- src/libsyntax/parse/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse/mod.rs') 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) 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!() } }; -- cgit 1.4.1-3-g733a5