dont pass in src if we are not reading from stdin in compiletest

This commit is contained in:
Tinco Andringa 2018-09-10 12:10:41 +02:00
parent 9478190afc
commit ca901a187c

View File

@ -521,11 +521,16 @@ impl<'test> TestCx<'test> {
.args(&self.props.compile_flags)
.envs(self.props.exec_env.clone());
let src_to_read = match read_from {
ReadFrom::Stdin => Some(src),
ReadFrom::Path => None
};
self.compose_and_run(
rustc,
self.config.compile_lib_path.to_str().unwrap(),
Some(aux_dir.to_str().unwrap()),
Some(src),
src_to_read,
)
}