Skip to content

Commit aa046da

Browse files
committed
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.
1 parent 3024c4e commit aa046da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn run_test(
282282
for debugging_option_str in &options.debugging_options_strs {
283283
compiler.arg("-Z").arg(&debugging_option_str);
284284
}
285-
if no_run {
285+
if no_run && !compile_fail {
286286
compiler.arg("--emit=metadata");
287287
}
288288
compiler.arg("--target").arg(target.to_string());

0 commit comments

Comments
 (0)