We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 399149a commit fd0632fCopy full SHA for fd0632f
src/tools/compiletest/src/json.rs
@@ -11,6 +11,7 @@
11
use errors::{Error, ErrorKind};
12
use rustc_serialize::json;
13
use std::str::FromStr;
14
+use std::path::Path;
15
16
// These structs are a subset of the ones found in
17
// `syntax::errors::json`.
@@ -82,7 +83,9 @@ fn push_expected_errors(expected_errors: &mut Vec<Error>,
82
83
file_name: &str) {
84
// We only consider messages pertaining to the current file.
85
let matching_spans = || {
- diagnostic.spans.iter().filter(|span| span.file_name == file_name)
86
+ diagnostic.spans.iter().filter(|span| {
87
+ Path::new(&span.file_name) == Path::new(&file_name)
88
+ })
89
};
90
91
// We break the output into multiple lines, and then append the
0 commit comments