diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-10-31 12:24:01 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-11-07 13:09:52 +0100 |
| commit | 0332a39f07f259fc346be91d2cb41d58e8a968b7 (patch) | |
| tree | 810bf28deb299a42bee3961baab1d514600689fc | |
| parent | bf544fa920efb1614f95ebc783fbd11c07604972 (diff) | |
| download | rust-0332a39f07f259fc346be91d2cb41d58e8a968b7.tar.gz rust-0332a39f07f259fc346be91d2cb41d58e8a968b7.zip | |
Replaced use of `#[rustc_error]` with `// skip-codegen`.
This test specifically notes that it does not want to invoke the linker, due to the way it (IMO weakly) exercises the `#[link=...]` attribute. In any case, removing the the `#[rustc_error]` here uncovered an "invalid windows subsystem" error that was previously not included in the transcript of diagnostic output. So that's a step forward, (right?).
| -rw-r--r-- | src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs | 16 | ||||
| -rw-r--r-- | src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr | 8 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs index bbddbb7d679..3f340145acf 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs @@ -40,7 +40,7 @@ // inputs are handled by each, and (2.) to ease searching for related // occurrences in the source text. -#![feature(rustc_attrs)] // For `rustc_error`; see note below. +// skip-codegen #![warn(unused_attributes, unknown_lints)] #![allow(dead_code)] #![allow(stable_features)] @@ -584,7 +584,7 @@ mod export_name { #[export_name = "2200"] impl S { } } -// Note that this test ends with a `#[rustc_error] fn main()`, so it +// Note that this test has a `skip-codegen`, so it // will never invoke the linker. These are here nonetheless to point // out that we allow them at non-crate-level (though I do not know // whether they have the same effect here as at crate-level). @@ -835,12 +835,12 @@ mod type_length_limit { //~| WARN crate-level attribute should be an inner attribute } -// Since we expect for the mix of attributes used here to compile -// successfully, and we are just testing for the expected warnings of -// various (mis)uses of attributes, we use the `rustc_error` attribute -// on the `fn main()`. -#[rustc_error] -fn main() { //~ ERROR compilation successful + + + + + +fn main() { println!("Hello World"); } diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index 3b31b411f3f..59e327bc1ba 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -1303,13 +1303,7 @@ warning: unused attribute LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: compilation successful - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:844:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | println!("Hello World"); -LL | | } - | |_^ +error: invalid windows subsystem `1000`, only `windows` and `console` are allowed error: aborting due to previous error |
