Skip to content

Commit

Permalink
tests: remove ignore directives from tests that mention core/alloc/st…
Browse files Browse the repository at this point in the history
…d spans.
  • Loading branch information
eddyb committed Apr 2, 2020
1 parent f5892c0 commit 8deff18
Show file tree
Hide file tree
Showing 164 changed files with 229 additions and 585 deletions.
3 changes: 0 additions & 3 deletions src/etc/generate-deriving-span-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
os.path.join(os.path.dirname(__file__), '../test/ui/derives/'))

TEMPLATE = """\
// 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
4 changes: 0 additions & 4 deletions src/test/ui/async-await/issues/issue-62009-1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// edition:2018
// 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:10:5
--> $DIR/issue-62009-1.rs:6: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:12:5
--> $DIR/issue-62009-1.rs:8: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:16:5
--> $DIR/issue-62009-1.rs:12: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:16:5: 16:15]: std::future::Future` is not satisfied
--> $DIR/issue-62009-1.rs:16:5
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]: std::future::Future` is not satisfied
--> $DIR/issue-62009-1.rs:12:5
|
LL | (|_| 2333).await;
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:16:5: 16:15]`
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
|
::: $SRC_DIR/libcore/future/mod.rs:LL:COL
|
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/closures/closure-move-sync.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:10:13
--> $DIR/closure-move-sync.rs:6: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:10:27: 13:6 recv:&std::sync::mpsc::Receiver<()>]`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6 recv:&std::sync::mpsc::Receiver<()>]`

error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:22:5
--> $DIR/closure-move-sync.rs:18: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:22:19: 22:42 tx:&std::sync::mpsc::Sender<()>]`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42 tx:&std::sync::mpsc::Sender<()>]`

error: aborting due to 2 previous errors

Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/consts/const-size_of-cycle.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:8:17
--> $DIR/const-size_of-cycle.rs:4: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:8:17
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `Foo::bytes::{{constant}}#0`...
--> $DIR/const-size_of-cycle.rs:8:17
--> $DIR/const-size_of-cycle.rs:4: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 `[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:7:1
--> $DIR/const-size_of-cycle.rs:3:1
|
LL | struct Foo {
| ^^^^^^^^^^
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/consts/miri_unleashed/drop.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
// 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:21:9
--> $DIR/drop.rs:17:9
|
LL | let _v: Vec<i32> = Vec::new();
| ^^
Expand All @@ -17,10 +17,10 @@ LL | | }
| |_calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
| inside `std::intrinsics::drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
|
::: $DIR/drop.rs:23:1
::: $DIR/drop.rs:19:1
|
LL | };
| - inside `TEST_BAD` at $DIR/drop.rs:23:1
| - inside `TEST_BAD` at $DIR/drop.rs:19:1

error: aborting due to previous error

Expand Down
5 changes: 0 additions & 5 deletions src/test/ui/consts/offset_from_ub.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// 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)]
#![feature(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 @@ -6,9 +6,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| |
| ptr_offset_from cannot compute offset of pointers into different allocations.
| inside `std::ptr::const_ptr::<impl *const Struct>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL
| inside `DIFFERENT_ALLOC` at $DIR/offset_from_ub.rs:22:27
| inside `DIFFERENT_ALLOC` at $DIR/offset_from_ub.rs:17:27
|
::: $DIR/offset_from_ub.rs:16:1
::: $DIR/offset_from_ub.rs:11:1
|
LL | / pub const DIFFERENT_ALLOC: usize = {
LL | |
Expand All @@ -29,9 +29,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| |
| unable to turn bytes into a pointer
| inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL
| inside `NOT_PTR` at $DIR/offset_from_ub.rs:28:14
| inside `NOT_PTR` at $DIR/offset_from_ub.rs:23:14
|
::: $DIR/offset_from_ub.rs:26:1
::: $DIR/offset_from_ub.rs:21:1
|
LL | / pub const NOT_PTR: usize = {
LL | |
Expand All @@ -47,9 +47,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| |
| exact_div: 1isize cannot be divided by 2isize without remainder
| inside `std::ptr::const_ptr::<impl *const u16>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL
| inside `NOT_MULTIPLE_OF_SIZE` at $DIR/offset_from_ub.rs:36:14
| inside `NOT_MULTIPLE_OF_SIZE` at $DIR/offset_from_ub.rs:31:14
|
::: $DIR/offset_from_ub.rs:31:1
::: $DIR/offset_from_ub.rs:26:1
|
LL | / pub const NOT_MULTIPLE_OF_SIZE: isize = {
LL | |
Expand All @@ -68,9 +68,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| |
| invalid use of NULL pointer
| inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL
| inside `OFFSET_FROM_NULL` at $DIR/offset_from_ub.rs:42:14
| inside `OFFSET_FROM_NULL` at $DIR/offset_from_ub.rs:37:14
|
::: $DIR/offset_from_ub.rs:39:1
::: $DIR/offset_from_ub.rs:34:1
|
LL | / pub const OFFSET_FROM_NULL: isize = {
LL | |
Expand All @@ -87,9 +87,9 @@ LL | intrinsics::ptr_offset_from(self, origin)
| |
| unable to turn bytes into a pointer
| inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL
| inside `DIFFERENT_INT` at $DIR/offset_from_ub.rs:49:14
| inside `DIFFERENT_INT` at $DIR/offset_from_ub.rs:44:14
|
::: $DIR/offset_from_ub.rs:45:1
::: $DIR/offset_from_ub.rs:40:1
|
LL | / pub const DIFFERENT_INT: isize = { // offset_from with two different integers: like DIFFERENT_ALLOC
LL | |
Expand Down
5 changes: 0 additions & 5 deletions src/test/ui/copy-a-resource.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl

#[derive(Debug)]
struct Foo {
i: isize,
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/copy-a-resource.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `clone` found for struct `Foo` in the current scope
--> $DIR/copy-a-resource.rs:23:16
--> $DIR/copy-a-resource.rs:18:16
|
LL | struct Foo {
| ---------- method `clone` not found for this
Expand Down
5 changes: 0 additions & 5 deletions src/test/ui/derives/derive-assoc-type-not-impl.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl

trait Foo {
type X;
fn method(&self) {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derive-assoc-type-not-impl.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `clone` found for struct `Bar<NotClone>` in the current scope
--> $DIR/derive-assoc-type-not-impl.rs:23:30
--> $DIR/derive-assoc-type-not-impl.rs:18:30
|
LL | struct Bar<T: Foo> {
| ------------------
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Clone-enum-struct-variant.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:13:6
--> $DIR/derives-span-Clone-enum-struct-variant.rs:9:6
|
LL | x: Error
| ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Clone-enum.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:13:6
--> $DIR/derives-span-Clone-enum.rs:9:6
|
LL | Error
| ^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Clone-struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:12:5
--> $DIR/derives-span-Clone-struct.rs:8:5
|
LL | x: Error
| ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Clone-tuple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:12:5
--> $DIR/derives-span-Clone-tuple-struct.rs:8:5
|
LL | Error
| ^^^^^ the trait `std::clone::Clone` is not implemented for `Error`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Debug-enum-struct-variant.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:13:6
--> $DIR/derives-span-Debug-enum-struct-variant.rs:9:6
|
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Debug-enum.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:13:6
--> $DIR/derives-span-Debug-enum.rs:9:6
|
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Debug-struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:12:5
--> $DIR/derives-span-Debug-struct.rs:8:5
|
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Debug-tuple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:12:5
--> $DIR/derives-span-Debug-tuple-struct.rs:8:5
|
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/derives/derives-span-Default-struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// 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:12:5
--> $DIR/derives-span-Default-struct.rs:8:5
|
LL | x: Error
| ^^^^^^^^ the trait `std::default::Default` is not implemented for `Error`
Expand Down
Loading

0 comments on commit 8deff18

Please sign in to comment.