Skip to content

Commit 6b1b68f

Browse files
authored
Rollup merge of #144356 - GuillaumeGomez:gcc-ignore-tests, r=jieyouxu
Add `ignore-backends` annotations in failing GCC backend ui tests Follow-up of #144125. In the GCC backend, we don't support all ui tests yet and we have a list of tests we currently ignore available [here](https://github.com/rust-lang/rustc_codegen_gcc/blob/master/tests/failing-ui-tests.txt). This PR adds the `ignore-backends` annotations to the corresponding ui tests. The second commit is a fix to compiletest, complaining about `ignore-backends`. r? ```@jieyouxu```
2 parents 2671afe + 910ee2d commit 6b1b68f

File tree

93 files changed

+128
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+128
-34
lines changed

src/tools/compiletest/src/directives/cfg.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ fn parse_cfg_name_directive<'a>(
285285
if name == "gdb-version" {
286286
outcome = MatchOutcome::External;
287287
}
288+
289+
// Don't error out for ignore-backends,as it is handled elsewhere.
290+
if name == "backends" {
291+
outcome = MatchOutcome::External;
292+
}
288293
}
289294

290295
ParsedNameDirective {

tests/ui/allocator/no_std-alloc-error-handler-custom.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//@ ignore-android no libc
33
//@ ignore-emscripten no libc
44
//@ ignore-sgx no libc
5+
//@ ignore-backends: gcc
56
//@ only-linux
67
//@ compile-flags:-C panic=abort
78
//@ aux-build:helper.rs

tests/ui/allocator/no_std-alloc-error-handler-default.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//@ ignore-android no libc
33
//@ ignore-emscripten no libc
44
//@ ignore-sgx no libc
5+
//@ ignore-backends: gcc
56
//@ only-linux
67
//@ compile-flags:-C panic=abort
78
//@ aux-build:helper.rs

tests/ui/asm/may_unwind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-pass
22
//@ needs-asm-support
33
//@ needs-unwind
4+
//@ ignore-backends: gcc
45

56
#![feature(asm_unwind)]
67

tests/ui/asm/x86_64/may_unwind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//@ run-pass
33
//@ needs-asm-support
44
//@ needs-unwind
5+
//@ ignore-backends: gcc
56

67
#![feature(asm_unwind)]
78

tests/ui/async-await/deep-futures-are-freeze.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ ignore-backends: gcc
12
//@ build-pass
23
//@ compile-flags: -Copt-level=s -Clto=fat
34
//@ no-prefer-dynamic

tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ ignore-backends: gcc
12
//@ edition: 2021
23
//@ known-bug: #108309
34

tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
error[E0053]: method `foo` has an incompatible type for trait
2-
--> $DIR/dont-project-to-specializable-projection.rs:13:5
2+
--> $DIR/dont-project-to-specializable-projection.rs:14:5
33
|
44
LL | default async fn foo(_: T) -> &'static str {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found future
66
|
77
note: type in trait
8-
--> $DIR/dont-project-to-specializable-projection.rs:9:5
8+
--> $DIR/dont-project-to-specializable-projection.rs:10:5
99
|
1010
LL | async fn foo(_: T) -> &'static str;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= note: expected signature `fn(_) -> impl Future<Output = &'static str>`
1313
found signature `fn(_) -> impl Future<Output = &'static str>`
1414

1515
error: async associated function in trait cannot be specialized
16-
--> $DIR/dont-project-to-specializable-projection.rs:13:5
16+
--> $DIR/dont-project-to-specializable-projection.rs:14:5
1717
|
1818
LL | default async fn foo(_: T) -> &'static str {
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020
|
2121
= note: specialization behaves in inconsistent and surprising ways with async functions in traits, and for now is disallowed
2222

2323
error[E0599]: no method named `poll` found for struct `Pin<&mut impl Future<Output = ()>>` in the current scope
24-
--> $DIR/dont-project-to-specializable-projection.rs:48:28
24+
--> $DIR/dont-project-to-specializable-projection.rs:49:28
2525
|
2626
LL | match fut.as_mut().poll(ctx) {
2727
| ^^^^ method not found in `Pin<&mut impl Future<Output = ()>>`

tests/ui/backtrace/dylib-dep.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//@ ignore-fuchsia Backtraces not symbolized
99
//@ ignore-musl musl doesn't support dynamic libraries (at least when the original test was written).
1010
//@ needs-unwind
11+
//@ ignore-backends: gcc
1112
//@ compile-flags: -g -Copt-level=0 -Cstrip=none -Cforce-frame-pointers=yes
1213
//@ ignore-emscripten Requires custom symbolization code
1314
//@ aux-crate: dylib_dep_helper=dylib-dep-helper.rs

tests/ui/cfg/cfg-panic-abort.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ build-pass
22
//@ compile-flags: -C panic=abort
33
//@ no-prefer-dynamic
4+
//@ ignore-backends: gcc
45

56
#[cfg(panic = "unwind")]
67
pub fn bad() -> i32 { }

0 commit comments

Comments
 (0)