about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-10-18 11:52:23 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-10-24 14:21:57 -0700
commit6b70ddfba1ed5fca7fa67e5f2d2691e9c667d3a3 (patch)
treec5f2dbd75d45048ff68121ac870bde1ae34d2cd3 /src/libsyntax/ext
parente117aa0e2a4121aab101cb7526a5e79812bfb76e (diff)
downloadrust-6b70ddfba1ed5fca7fa67e5f2d2691e9c667d3a3.tar.gz
rust-6b70ddfba1ed5fca7fa67e5f2d2691e9c667d3a3.zip
Remove io::read_error
The general idea is to remove conditions completely from I/O, so in the meantime
remove the read_error condition to mean the same thing as the io_error condition.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/source_util.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs
index df177cf75dc..047fc541ba8 100644
--- a/src/libsyntax/ext/source_util.rs
+++ b/src/libsyntax/ext/source_util.rs
@@ -93,7 +93,7 @@ pub fn expand_include_str(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree])
     let file = get_single_str_from_tts(cx, sp, tts, "include_str!");
     let file = res_rel_file(cx, sp, &Path::new(file));
     let mut error = None;
-    let bytes = do io::read_error::cond.trap(|e| error = Some(e)).inside {
+    let bytes = do io::io_error::cond.trap(|e| error = Some(e)).inside {
         file.open_reader(io::Open).read_to_end()
     };
     match error {
@@ -120,10 +120,8 @@ pub fn expand_include_bin(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree])
     let file = res_rel_file(cx, sp, &Path::new(file));
 
     let mut error = None;
-    let bytes = do io::read_error::cond.trap(|e| error = Some(e)).inside {
-        do io::io_error::cond.trap(|e| error = Some(e)).inside {
-            file.open_reader(io::Open).read_to_end()
-        }
+    let bytes = do io::io_error::cond.trap(|e| error = Some(e)).inside {
+        file.open_reader(io::Open).read_to_end()
     };
     match error {
         Some(e) => {