Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teach compiletest to ignore platform triples #67334

Merged
merged 2 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/etc/generate-deriving-span-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
os.path.join(os.path.dirname(__file__), '../test/ui/derives/'))

TEMPLATE = """\
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'

{error_deriving}
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/async-await/issues/issue-62009-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// edition:2018
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl

async fn print_dur() {}

Expand Down
12 changes: 6 additions & 6 deletions src/test/ui/async-await/issues/issue-62009-1.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:7:5
--> $DIR/issue-62009-1.rs:10:5
|
LL | fn main() {
| ---- this is not `async`
LL | async { let (); }.await;
| ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:9:5
--> $DIR/issue-62009-1.rs:12:5
|
LL | fn main() {
| ---- this is not `async`
Expand All @@ -19,19 +19,19 @@ LL | | }.await;
| |___________^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:13:5
--> $DIR/issue-62009-1.rs:16:5
|
LL | fn main() {
| ---- this is not `async`
...
LL | (|_| 2333).await;
| ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks

error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:13:5: 13:15]: std::future::Future` is not satisfied
--> $DIR/issue-62009-1.rs:13:5
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:16:5: 16:15]: std::future::Future` is not satisfied
--> $DIR/issue-62009-1.rs:16:5
|
LL | (|_| 2333).await;
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:13:5: 13:15]`
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:16:5: 16:15]`
|
= note: required by `std::future::IntoFuture::into_future`

Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/closures/closure-move-sync.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
use std::thread;
use std::sync::mpsc::channel;

Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/closures/closure-move-sync.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:7:13
--> $DIR/closure-move-sync.rs:10:13
|
LL | let t = thread::spawn(|| {
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
Expand All @@ -11,10 +11,10 @@ LL | F: Send + 'static,
|
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:7:27: 10:6 recv:&std::sync::mpsc::Receiver<()>]`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:10:27: 13:6 recv:&std::sync::mpsc::Receiver<()>]`

error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:19:5
--> $DIR/closure-move-sync.rs:22:5
|
LL | thread::spawn(|| tx.send(()).unwrap());
| ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
Expand All @@ -26,7 +26,7 @@ LL | F: Send + 'static,
|
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:19:19: 19:42 tx:&std::sync::mpsc::Sender<()>]`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:22:19: 22:42 tx:&std::sync::mpsc::Sender<()>]`

error: aborting due to 2 previous errors

Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/consts/const-size_of-cycle.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// error-pattern: cycle detected

struct Foo {
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/consts/const-size_of-cycle.stderr
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0391]: cycle detected when const-evaluating + checking `Foo::bytes::{{constant}}#0`
--> $DIR/const-size_of-cycle.rs:5:17
--> $DIR/const-size_of-cycle.rs:8:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires const-evaluating + checking `Foo::bytes::{{constant}}#0`...
--> $DIR/const-size_of-cycle.rs:5:17
--> $DIR/const-size_of-cycle.rs:8:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `Foo::bytes::{{constant}}#0`...
--> $DIR/const-size_of-cycle.rs:5:17
--> $DIR/const-size_of-cycle.rs:8:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -28,7 +28,7 @@ LL | pub fn size_of<T>() -> usize;
= note: ...which requires normalizing `ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All, def_id: None }, value: [u8; _] }`...
= note: ...which again requires const-evaluating + checking `Foo::bytes::{{constant}}#0`, completing the cycle
note: cycle used when processing `Foo`
--> $DIR/const-size_of-cycle.rs:4:1
--> $DIR/const-size_of-cycle.rs:7:1
|
LL | struct Foo {
| ^^^^^^^^^^
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/consts/miri_unleashed/drop.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// error-pattern: calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
#![deny(const_err)]

Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/consts/miri_unleashed/drop.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: skipping const checks
--> $DIR/drop.rs:18:9
--> $DIR/drop.rs:21:9
|
LL | let _v: Vec<i32> = Vec::new();
| ^^
Expand All @@ -14,10 +14,10 @@ LL | | real_drop_in_place(to_drop)
LL | | }
| |_^ calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
|
::: $DIR/drop.rs:20:1
::: $DIR/drop.rs:23:1
|
LL | };
| - inside call to `std::ptr::real_drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $DIR/drop.rs:20:1
| - inside call to `std::ptr::real_drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $DIR/drop.rs:23:1

error: aborting due to previous error

Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/consts/offset_from_ub.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl

#![feature(const_raw_ptr_deref)]
#![feature(const_ptr_offset_from)]
Expand Down
20 changes: 10 additions & 10 deletions src/test/ui/consts/offset_from_ub.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| ptr_offset_from cannot compute offset of pointers into different allocations.
| inside call to `std::ptr::const_ptr::<impl *const Struct>::offset_from` at $DIR/offset_from_ub.rs:19:27
| inside call to `std::ptr::const_ptr::<impl *const Struct>::offset_from` at $DIR/offset_from_ub.rs:22:27
|
::: $DIR/offset_from_ub.rs:13:1
::: $DIR/offset_from_ub.rs:16:1
|
LL | / pub const DIFFERENT_ALLOC: usize = {
LL | |
Expand All @@ -27,9 +27,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| a memory access tried to interpret some bytes as a pointer
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:25:14
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:28:14
|
::: $DIR/offset_from_ub.rs:23:1
::: $DIR/offset_from_ub.rs:26:1
|
LL | / pub const NOT_PTR: usize = {
LL | |
Expand All @@ -44,9 +44,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| exact_div: 1 cannot be divided by 2 without remainder
| inside call to `std::ptr::const_ptr::<impl *const u16>::offset_from` at $DIR/offset_from_ub.rs:33:14
| inside call to `std::ptr::const_ptr::<impl *const u16>::offset_from` at $DIR/offset_from_ub.rs:36:14
|
::: $DIR/offset_from_ub.rs:28:1
::: $DIR/offset_from_ub.rs:31:1
|
LL | / pub const NOT_MULTIPLE_OF_SIZE: isize = {
LL | |
Expand All @@ -64,9 +64,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| invalid use of NULL pointer
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:39:14
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:42:14
|
::: $DIR/offset_from_ub.rs:36:1
::: $DIR/offset_from_ub.rs:39:1
|
LL | / pub const OFFSET_FROM_NULL: isize = {
LL | |
Expand All @@ -82,9 +82,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| a memory access tried to interpret some bytes as a pointer
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:46:14
| inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:49:14
|
::: $DIR/offset_from_ub.rs:42:1
::: $DIR/offset_from_ub.rs:45:1
|
LL | / pub const DIFFERENT_INT: isize = { // offset_from with two different integers: like DIFFERENT_ALLOC
LL | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied
--> $DIR/derives-span-Clone-enum-struct-variant.rs:10:6
--> $DIR/derives-span-Clone-enum-struct-variant.rs:13:6
|
LL | x: Error
| ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Clone-enum.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Clone-enum.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied
--> $DIR/derives-span-Clone-enum.rs:10:6
--> $DIR/derives-span-Clone-enum.rs:13:6
|
LL | Error
| ^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Clone-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Clone-struct.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied
--> $DIR/derives-span-Clone-struct.rs:9:5
--> $DIR/derives-span-Clone-struct.rs:12:5
|
LL | x: Error
| ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Clone-tuple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Clone-tuple-struct.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied
--> $DIR/derives-span-Clone-tuple-struct.rs:9:5
--> $DIR/derives-span-Clone-tuple-struct.rs:12:5
|
LL | Error
| ^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `Error` doesn't implement `std::fmt::Debug`
--> $DIR/derives-span-Debug-enum-struct-variant.rs:10:6
--> $DIR/derives-span-Debug-enum-struct-variant.rs:13:6
|
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Debug-enum.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Debug-enum.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `Error` doesn't implement `std::fmt::Debug`
--> $DIR/derives-span-Debug-enum.rs:10:6
--> $DIR/derives-span-Debug-enum.rs:13:6
|
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Debug-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Debug-struct.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `Error` doesn't implement `std::fmt::Debug`
--> $DIR/derives-span-Debug-struct.rs:9:5
--> $DIR/derives-span-Debug-struct.rs:12:5
|
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Debug-tuple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Debug-tuple-struct.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `Error` doesn't implement `std::fmt::Debug`
--> $DIR/derives-span-Debug-tuple-struct.rs:9:5
--> $DIR/derives-span-Debug-tuple-struct.rs:12:5
|
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Default-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Default-struct.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::default::Default` is not satisfied
--> $DIR/derives-span-Default-struct.rs:9:5
--> $DIR/derives-span-Default-struct.rs:12:5
|
LL | x: Error
| ^^^^^^^^ the trait `std::default::Default` is not implemented for `Error`
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui/derives/derives-span-Default-tuple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-x86 FIXME: missing sysroot spans (#53081)
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `Error: std::default::Default` is not satisfied
--> $DIR/derives-span-Default-tuple-struct.rs:9:5
--> $DIR/derives-span-Default-tuple-struct.rs:12:5
|
LL | Error
| ^^^^^ the trait `std::default::Default` is not implemented for `Error`
Expand Down
Loading