From aa046da61f8722dfe46204cb303dbc9d2b4cb32e Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Thu, 30 Jan 2020 15:49:21 +0100 Subject: 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. --- src/librustdoc/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index d89dc2adafe..37ff292205a 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -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()); -- cgit 1.4.1-3-g733a5