about summary refs log tree commit diff
path: root/src/compiletest/errors.rs
diff options
context:
space:
mode:
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 7ad0cd2a95d..418a0bc7121 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -115,7 +115,7 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
                   tag: &str)
                   -> Option<(WhichLine, ExpectedError)> {
     let start = match line.find(tag) { Some(i) => i, None => return None };
-    let (follow, adjusts) = if line.char_at(start + tag.len()) == '|' {
+    let (follow, adjusts) = if line[start + tag.len()..].chars().next().unwrap() == '|' {
         (true, 0)
     } else {
         (false, line[start + tag.len()..].chars().take_while(|c| *c == '^').count())