Function compiletest_rs::errors::load_errors
source · pub fn load_errors(testfile: &Path, cfg: Option<&str>) -> Vec<Error>
Expand description
Looks for either “//| KIND MESSAGE” or “//^^… KIND MESSAGE”
The former is a “follow” that inherits its target from the preceding line;
the latter is an “adjusts” that goes that many lines up.
Goal is to enable tests both like: //^^^ ERROR go up three
and also //^ ERROR message one for the preceding line, and
//~| ERROR message two for that same line.
If cfg is not None (i.e., in an incremental test), then we look
for //[X]~
instead, where X
is the current cfg
.