about summary refs log tree commit diff
path: root/src/compiletest/errors.rs
diff options
context:
space:
mode:
authorPalmer Cox <p@lmercox.com>2014-02-19 21:53:46 -0500
committerPalmer Cox <p@lmercox.com>2014-03-12 22:42:50 -0400
commit9ba6bb5a71adeb861f8bf21c2b1f2fde3132480d (patch)
tree8b334634887fcd0a6ba5a2ed926aec010386fc05 /src/compiletest/errors.rs
parent2eebeb81372e320510a1c1e2eef96eb5146a1e1f (diff)
downloadrust-9ba6bb5a71adeb861f8bf21c2b1f2fde3132480d.tar.gz
rust-9ba6bb5a71adeb861f8bf21c2b1f2fde3132480d.zip
Update io iterators to produce IoResults
Most IO related functions return an IoResult so that the caller can handle failure
in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all
supress errors. This means that code that needs to handle errors can't use any of these
iterators. All three of these iterators were updated to produce IoResults.

Fixes #12368
Diffstat (limited to 'src/compiletest/errors.rs')
-rw-r--r--src/compiletest/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 3a6b1666c1e..4fee64e6304 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -19,7 +19,7 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
     let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
     let mut line_num = 1u;
     for ln in rdr.lines() {
-        error_patterns.push_all_move(parse_expected(line_num, ln));
+        error_patterns.push_all_move(parse_expected(line_num, ln.unwrap()));
         line_num += 1u;
     }
     return error_patterns;