Skip to content

Commit ca901a1

Browse files
committed
dont pass in src if we are not reading from stdin in compiletest
1 parent 9478190 commit ca901a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/compiletest/src/runtest.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,16 @@ impl<'test> TestCx<'test> {
521521
.args(&self.props.compile_flags)
522522
.envs(self.props.exec_env.clone());
523523

524+
let src_to_read = match read_from {
525+
ReadFrom::Stdin => Some(src),
526+
ReadFrom::Path => None
527+
};
528+
524529
self.compose_and_run(
525530
rustc,
526531
self.config.compile_lib_path.to_str().unwrap(),
527532
Some(aux_dir.to_str().unwrap()),
528-
Some(src),
533+
src_to_read,
529534
)
530535
}
531536

0 commit comments

Comments
 (0)