Skip to content

Commit f81734b

Browse files
committed
ignore musl target in tests to avoid issues with output differences
1 parent b214085 commit f81734b

23 files changed

+52
-28
lines changed

src/etc/generate-deriving-span-tests.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
os.path.join(os.path.dirname(__file__), '../test/ui/derives/'))
1515

1616
TEMPLATE = """\
17+
// ignore-musl
18+
// ^ due to stderr output differences
1719
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
1820
1921
{error_deriving}

src/test/ui/async-await/issues/issue-62009-1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// edition:2018
2+
// ignore-musl
3+
// ^ due to stderr output differences
24

35
async fn print_dur() {}
46

src/test/ui/async-await/issues/issue-62009-1.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0728]: `await` is only allowed inside `async` functions and blocks
2-
--> $DIR/issue-62009-1.rs:6:5
2+
--> $DIR/issue-62009-1.rs:8:5
33
|
44
LL | fn main() {
55
| ---- this is not `async`
66
LL | async { let (); }.await;
77
| ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
88

99
error[E0728]: `await` is only allowed inside `async` functions and blocks
10-
--> $DIR/issue-62009-1.rs:8:5
10+
--> $DIR/issue-62009-1.rs:10:5
1111
|
1212
LL | fn main() {
1313
| ---- this is not `async`
@@ -19,19 +19,19 @@ LL | | }.await;
1919
| |___________^ only allowed inside `async` functions and blocks
2020

2121
error[E0728]: `await` is only allowed inside `async` functions and blocks
22-
--> $DIR/issue-62009-1.rs:12:5
22+
--> $DIR/issue-62009-1.rs:14:5
2323
|
2424
LL | fn main() {
2525
| ---- this is not `async`
2626
...
2727
LL | (|_| 2333).await;
2828
| ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
2929

30-
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]: std::future::Future` is not satisfied
31-
--> $DIR/issue-62009-1.rs:12:5
30+
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]: std::future::Future` is not satisfied
31+
--> $DIR/issue-62009-1.rs:14:5
3232
|
3333
LL | (|_| 2333).await;
34-
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
34+
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]`
3535
|
3636
::: $SRC_DIR/libstd/future.rs:LL:COL
3737
|

src/test/ui/closures/closure-move-sync.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
use std::thread;
24
use std::sync::mpsc::channel;
35

src/test/ui/closures/closure-move-sync.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2-
--> $DIR/closure-move-sync.rs:6:13
2+
--> $DIR/closure-move-sync.rs:8:13
33
|
44
LL | let t = thread::spawn(|| {
55
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
@@ -11,10 +11,10 @@ LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
1111
|
1212
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
1313
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>`
14-
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6 recv:&std::sync::mpsc::Receiver<()>]`
14+
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:8:27: 11:6 recv:&std::sync::mpsc::Receiver<()>]`
1515

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

3131
error: aborting due to 2 previous errors
3232

src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
24

35

src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied
2-
--> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6
2+
--> $DIR/derives-span-Hash-enum-struct-variant.rs:11:6
33
|
44
LL | x: Error
55
| ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error`

src/test/ui/derives/derives-span-Hash-enum.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
24

35

src/test/ui/derives/derives-span-Hash-enum.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied
2-
--> $DIR/derives-span-Hash-enum.rs:9:6
2+
--> $DIR/derives-span-Hash-enum.rs:11:6
33
|
44
LL | Error
55
| ^^^^^ the trait `std::hash::Hash` is not implemented for `Error`

src/test/ui/derives/derives-span-Hash-struct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
24

35

src/test/ui/derives/derives-span-Hash-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied
2-
--> $DIR/derives-span-Hash-struct.rs:8:5
2+
--> $DIR/derives-span-Hash-struct.rs:10:5
33
|
44
LL | x: Error
55
| ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error`

src/test/ui/derives/derives-span-Hash-tuple-struct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
24

35

src/test/ui/derives/derives-span-Hash-tuple-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied
2-
--> $DIR/derives-span-Hash-tuple-struct.rs:8:5
2+
--> $DIR/derives-span-Hash-tuple-struct.rs:10:5
33
|
44
LL | Error
55
| ^^^^^ the trait `std::hash::Hash` is not implemented for `Error`

src/test/ui/interior-mutability/interior-mutability.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
use std::cell::Cell;
24
use std::panic::catch_unwind;
35
fn main() {

src/test/ui/interior-mutability/interior-mutability.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2-
--> $DIR/interior-mutability.rs:5:5
2+
--> $DIR/interior-mutability.rs:7:5
33
|
44
LL | catch_unwind(|| { x.set(23); });
55
| ^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
@@ -12,7 +12,7 @@ LL | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
1212
= help: within `std::cell::Cell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
1313
= note: required because it appears within the type `std::cell::Cell<i32>`
1414
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell<i32>`
15-
= note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&std::cell::Cell<i32>]`
15+
= note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:7:18: 7:35 x:&std::cell::Cell<i32>]`
1616

1717
error: aborting due to previous error
1818

src/test/ui/issues/issue-21160.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
struct Bar;
24

35
impl Bar {

src/test/ui/issues/issue-21160.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Bar: std::hash::Hash` is not satisfied
2-
--> $DIR/issue-21160.rs:8:12
2+
--> $DIR/issue-21160.rs:10:12
33
|
44
LL | struct Foo(Bar);
55
| ^^^ the trait `std::hash::Hash` is not implemented for `Bar`

src/test/ui/no-send-res-ports.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
use std::thread;
24
use std::rc::Rc;
35

src/test/ui/no-send-res-ports.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
2-
--> $DIR/no-send-res-ports.rs:25:5
2+
--> $DIR/no-send-res-ports.rs:27:5
33
|
44
LL | thread::spawn(move|| {
55
| ^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
@@ -9,10 +9,10 @@ LL | thread::spawn(move|| {
99
LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
1010
| ---- required by this bound in `std::thread::spawn`
1111
|
12-
= help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
12+
= help: within `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
1313
= note: required because it appears within the type `Port<()>`
1414
= note: required because it appears within the type `main::Foo`
15-
= note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]`
15+
= note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]`
1616

1717
error: aborting due to previous error
1818

src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// compile-flags: --test
2+
// ignore-musl
3+
// ^ due to stderr output differences
24

35
use std::num::ParseFloatError;
46

src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseFloatError>`
2-
--> $DIR/termination-trait-test-wrong-type.rs:6:1
2+
--> $DIR/termination-trait-test-wrong-type.rs:8:1
33
|
44
LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
55
LL | | "0".parse()

src/test/ui/traits/trait-suggest-where-clause.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-musl
2+
// ^ due to stderr output differences
13
use std::mem;
24

35
struct Misc<T:?Sized>(T);

src/test/ui/traits/trait-suggest-where-clause.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the size for values of type `U` cannot be known at compilation time
2-
--> $DIR/trait-suggest-where-clause.rs:7:5
2+
--> $DIR/trait-suggest-where-clause.rs:9:5
33
|
44
LL | mem::size_of::<U>();
55
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -14,7 +14,7 @@ LL | pub const fn size_of<T>() -> usize {
1414
= help: consider adding a `where U: std::marker::Sized` bound
1515

1616
error[E0277]: the size for values of type `U` cannot be known at compilation time
17-
--> $DIR/trait-suggest-where-clause.rs:10:5
17+
--> $DIR/trait-suggest-where-clause.rs:12:5
1818
|
1919
LL | mem::size_of::<Misc<U>>();
2020
| ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -30,7 +30,7 @@ LL | pub const fn size_of<T>() -> usize {
3030
= note: required because it appears within the type `Misc<U>`
3131

3232
error[E0277]: the trait bound `u64: std::convert::From<T>` is not satisfied
33-
--> $DIR/trait-suggest-where-clause.rs:15:5
33+
--> $DIR/trait-suggest-where-clause.rs:17:5
3434
|
3535
LL | <u64 as From<T>>::from;
3636
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `u64`
@@ -39,7 +39,7 @@ LL | <u64 as From<T>>::from;
3939
= note: required by `std::convert::From::from`
4040

4141
error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
42-
--> $DIR/trait-suggest-where-clause.rs:18:5
42+
--> $DIR/trait-suggest-where-clause.rs:20:5
4343
|
4444
LL | <u64 as From<<T as Iterator>::Item>>::from;
4545
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented for `u64`
@@ -48,15 +48,15 @@ LL | <u64 as From<<T as Iterator>::Item>>::from;
4848
= note: required by `std::convert::From::from`
4949

5050
error[E0277]: the trait bound `Misc<_>: std::convert::From<T>` is not satisfied
51-
--> $DIR/trait-suggest-where-clause.rs:23:5
51+
--> $DIR/trait-suggest-where-clause.rs:25:5
5252
|
5353
LL | <Misc<_> as From<T>>::from;
5454
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `Misc<_>`
5555
|
5656
= note: required by `std::convert::From::from`
5757

5858
error[E0277]: the size for values of type `[T]` cannot be known at compilation time
59-
--> $DIR/trait-suggest-where-clause.rs:28:5
59+
--> $DIR/trait-suggest-where-clause.rs:30:5
6060
|
6161
LL | mem::size_of::<[T]>();
6262
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -70,7 +70,7 @@ LL | pub const fn size_of<T>() -> usize {
7070
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
7171

7272
error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
73-
--> $DIR/trait-suggest-where-clause.rs:31:5
73+
--> $DIR/trait-suggest-where-clause.rs:33:5
7474
|
7575
LL | mem::size_of::<[&U]>();
7676
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time

0 commit comments

Comments
 (0)