rustdoc: attempt full build for compile_fail test

Some code fails when doing a full build but does not fail when only
emitting metadata. This commit makes sure compile_fail tests for such
code behave as expected, that is, the test succeeds because the
compilation fails.
This commit is contained in:
Trevor Spiteri 2020-01-30 15:49:21 +01:00
parent 3024c4e739
commit aa046da61f

View file

@ -282,7 +282,7 @@ fn run_test(
for debugging_option_str in &options.debugging_options_strs {
compiler.arg("-Z").arg(&debugging_option_str);
}
if no_run {
if no_run && !compile_fail {
compiler.arg("--emit=metadata");
}
compiler.arg("--target").arg(target.to_string());