Skip to content

Commit

Permalink
rustdoc: attempt full build for compile_fail test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tspiteri committed Jan 30, 2020
1 parent 3024c4e commit aa046da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/test.rs
Expand Up @@ -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());
Expand Down

0 comments on commit aa046da

Please sign in to comment.