diff options
| author | bors <bors@rust-lang.org> | 2020-02-06 08:48:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-06 08:48:01 +0000 |
| commit | 1f8df2508f2772d83011f0f651de86181123e519 (patch) | |
| tree | 9e9546bdf0fffddcf1417bf8fbbed3aadf5110a8 /src | |
| parent | 333c32a5a4a51cae562c47e0669bc5aeaf741c45 (diff) | |
| parent | 6d768ddecc13c4acf45730952c0af401a990383a (diff) | |
| download | rust-1f8df2508f2772d83011f0f651de86181123e519.tar.gz rust-1f8df2508f2772d83011f0f651de86181123e519.zip | |
Auto merge of #68664 - tspiteri:no_run-complete-build, r=nikomatsakis
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. Fixes #67771.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0454.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0458.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0459.md | 2 | ||||
| -rw-r--r-- | src/librustdoc/test.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0454.md b/src/librustc_error_codes/error_codes/E0454.md index d3314885081..80eb91e43d1 100644 --- a/src/librustc_error_codes/error_codes/E0454.md +++ b/src/librustc_error_codes/error_codes/E0454.md @@ -1,6 +1,6 @@ A link name was given with an empty name. Erroneous code example: -```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen) +```compile_fail,E0454 #[link(name = "")] extern {} // error: `#[link(name = "")]` given with empty name ``` diff --git a/src/librustc_error_codes/error_codes/E0458.md b/src/librustc_error_codes/error_codes/E0458.md index 385079d403d..5996f190b34 100644 --- a/src/librustc_error_codes/error_codes/E0458.md +++ b/src/librustc_error_codes/error_codes/E0458.md @@ -1,6 +1,6 @@ An unknown "kind" was specified for a link attribute. Erroneous code example: -```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen) +```compile_fail,E0458 #[link(kind = "wonderful_unicorn")] extern {} // error: unknown kind: `wonderful_unicorn` ``` diff --git a/src/librustc_error_codes/error_codes/E0459.md b/src/librustc_error_codes/error_codes/E0459.md index 663bc322ee6..580cbf1e1c6 100644 --- a/src/librustc_error_codes/error_codes/E0459.md +++ b/src/librustc_error_codes/error_codes/E0459.md @@ -1,6 +1,6 @@ A link was used without a name parameter. Erroneous code example: -```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen) +```compile_fail,E0459 #[link(kind = "dylib")] extern {} // error: `#[link(...)]` specified without `name = "foo"` ``` diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 2892c4b1537..556dab302b8 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -281,7 +281,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()); |
