diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-03-01 22:05:39 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-03-02 05:02:04 -0500 |
| commit | c5bdc35b606505940333fc605daae2532ca5710c (patch) | |
| tree | 99e75f895f4c37c8c7a27f657332747cc6597f18 /src/compiletest/errors.rs | |
| parent | bb2a425d5861297a9a5d08b8d5826b7703ecea04 (diff) | |
| download | rust-c5bdc35b606505940333fc605daae2532ca5710c.tar.gz rust-c5bdc35b606505940333fc605daae2532ca5710c.zip | |
refactor and generalize revisions
Diffstat (limited to 'src/compiletest/errors.rs')
| -rw-r--r-- | src/compiletest/errors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 63bc657baa4..44634e4d565 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -33,7 +33,7 @@ enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) } /// /// If cfg is not None (i.e., in an incremental test), then we look /// for `//[X]~` instead, where `X` is the current `cfg`. -pub fn load_errors(testfile: &Path, cfg: &Option<String>) -> Vec<ExpectedError> { +pub fn load_errors(testfile: &Path, cfg: Option<&str>) -> Vec<ExpectedError> { let rdr = BufReader::new(File::open(testfile).unwrap()); // `last_nonfollow_error` tracks the most recently seen @@ -46,8 +46,8 @@ pub fn load_errors(testfile: &Path, cfg: &Option<String>) -> Vec<ExpectedError> // updating it in the map callback below.) let mut last_nonfollow_error = None; - let tag = match *cfg { - Some(ref rev) => format!("//[{}]~", rev), + let tag = match cfg { + Some(rev) => format!("//[{}]~", rev), None => format!("//~") }; |
