diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-18 11:52:23 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-24 14:21:57 -0700 |
| commit | 6b70ddfba1ed5fca7fa67e5f2d2691e9c667d3a3 (patch) | |
| tree | c5f2dbd75d45048ff68121ac870bde1ae34d2cd3 /src/libsyntax/ext | |
| parent | e117aa0e2a4121aab101cb7526a5e79812bfb76e (diff) | |
| download | rust-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.rs | 8 |
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) => { |
