Skip to content

Commit 83cc8ac

Browse files
authored
Merge pull request #219 from madsmtm/ui-test-remove-line-numbers
Remove line numbers from UI tests
2 parents 34f52eb + c918cb9 commit 83cc8ac

23 files changed

+174
-174
lines changed

test-ui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2-foundation/gnustep-2-
2323
run = ["trybuild"]
2424

2525
[dependencies]
26-
trybuild = { version = "1.0", optional = true }
26+
trybuild = { version = "1.0.63", optional = true }
2727
block2 = { path = "../block2", default-features = false }
2828
objc2 = { path = "../objc2", default-features = false }
2929
objc2-foundation = { path = "../objc2-foundation", default-features = false }
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
error[E0277]: `*mut c_void` cannot be shared between threads safely
2-
--> ui/autoreleasepool_not_send_sync.rs:10:5
2+
--> ui/autoreleasepool_not_send_sync.rs
33
|
4-
10 | needs_sync::<AutoreleasePool>();
4+
| needs_sync::<AutoreleasePool>();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
66
|
77
= help: within `AutoreleasePool`, the trait `Sync` is not implemented for `*mut c_void`
88
= note: required because it appears within the type `AutoreleasePool`
99
note: required by a bound in `needs_sync`
10-
--> ui/autoreleasepool_not_send_sync.rs:6:27
10+
--> ui/autoreleasepool_not_send_sync.rs
1111
|
12-
6 | fn needs_sync<T: ?Sized + Sync>() {}
12+
| fn needs_sync<T: ?Sized + Sync>() {}
1313
| ^^^^ required by this bound in `needs_sync`
1414

1515
error[E0277]: `*mut UnsafeCell<c_void>` cannot be shared between threads safely
16-
--> ui/autoreleasepool_not_send_sync.rs:10:5
16+
--> ui/autoreleasepool_not_send_sync.rs
1717
|
18-
10 | needs_sync::<AutoreleasePool>();
18+
| needs_sync::<AutoreleasePool>();
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be shared between threads safely
2020
|
2121
= help: within `AutoreleasePool`, the trait `Sync` is not implemented for `*mut UnsafeCell<c_void>`
2222
= note: required because it appears within the type `PhantomData<*mut UnsafeCell<c_void>>`
2323
= note: required because it appears within the type `AutoreleasePool`
2424
note: required by a bound in `needs_sync`
25-
--> ui/autoreleasepool_not_send_sync.rs:6:27
25+
--> ui/autoreleasepool_not_send_sync.rs
2626
|
27-
6 | fn needs_sync<T: ?Sized + Sync>() {}
27+
| fn needs_sync<T: ?Sized + Sync>() {}
2828
| ^^^^ required by this bound in `needs_sync`
2929

3030
error[E0277]: `*mut c_void` cannot be sent between threads safely
31-
--> ui/autoreleasepool_not_send_sync.rs:11:5
31+
--> ui/autoreleasepool_not_send_sync.rs
3232
|
33-
11 | needs_send::<AutoreleasePool>();
33+
| needs_send::<AutoreleasePool>();
3434
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
3535
|
3636
= help: within `AutoreleasePool`, the trait `Send` is not implemented for `*mut c_void`
3737
= note: required because it appears within the type `AutoreleasePool`
3838
note: required by a bound in `needs_send`
39-
--> ui/autoreleasepool_not_send_sync.rs:7:27
39+
--> ui/autoreleasepool_not_send_sync.rs
4040
|
41-
7 | fn needs_send<T: ?Sized + Send>() {}
41+
| fn needs_send<T: ?Sized + Send>() {}
4242
| ^^^^ required by this bound in `needs_send`
4343

4444
error[E0277]: `*mut UnsafeCell<c_void>` cannot be sent between threads safely
45-
--> ui/autoreleasepool_not_send_sync.rs:11:5
45+
--> ui/autoreleasepool_not_send_sync.rs
4646
|
47-
11 | needs_send::<AutoreleasePool>();
47+
| needs_send::<AutoreleasePool>();
4848
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be sent between threads safely
4949
|
5050
= help: within `AutoreleasePool`, the trait `Send` is not implemented for `*mut UnsafeCell<c_void>`
5151
= note: required because it appears within the type `PhantomData<*mut UnsafeCell<c_void>>`
5252
= note: required because it appears within the type `AutoreleasePool`
5353
note: required by a bound in `needs_send`
54-
--> ui/autoreleasepool_not_send_sync.rs:7:27
54+
--> ui/autoreleasepool_not_send_sync.rs
5555
|
56-
7 | fn needs_send<T: ?Sized + Send>() {}
56+
| fn needs_send<T: ?Sized + Send>() {}
5757
| ^^^^ required by this bound in `needs_send`

test-ui/ui/fn_ptr_reference_encode.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error: implementation of `Encode` is not general enough
2-
--> ui/fn_ptr_reference_encode.rs:18:5
2+
--> ui/fn_ptr_reference_encode.rs
33
|
4-
18 | impls_encode(my_fn as extern "C" fn(&i32));
4+
| impls_encode(my_fn as extern "C" fn(&i32));
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Encode` is not general enough
66
|
77
= note: `Encode` would have to be implemented for the type `for<'r> extern "C" fn(&'r i32)`
88
= note: ...but `Encode` is actually implemented for the type `extern "C" fn(&'0 i32)`, for some specific lifetime `'0`
99

1010
error: implementation of `Encode` is not general enough
11-
--> ui/fn_ptr_reference_encode.rs:19:21
11+
--> ui/fn_ptr_reference_encode.rs
1212
|
13-
19 | let _encoding = <extern "C" fn(&i32) as Encode>::ENCODING;
13+
| let _encoding = <extern "C" fn(&i32) as Encode>::ENCODING;
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Encode` is not general enough
1515
|
1616
= note: `Encode` would have to be implemented for the type `for<'r> extern "C" fn(&'r i32)`

test-ui/ui/fn_ptr_reference_method.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0277]: the trait bound `for<'r> extern "C" fn(_, _, &'r objc2::runtime::Object): MethodImplementation` is not satisfied
2-
--> ui/fn_ptr_reference_method.rs:21:42
2+
--> ui/fn_ptr_reference_method.rs
33
|
4-
21 | builder.add_method(sel!(third:), my_fn as extern "C" fn(_, _, &Object));
4+
| builder.add_method(sel!(third:), my_fn as extern "C" fn(_, _, &Object));
55
| ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MethodImplementation` is not implemented for `for<'r> extern "C" fn(_, _, &'r objc2::runtime::Object)`
66
| |
77
| required by a bound introduced by this call

test-ui/ui/fn_ptr_reference_method2.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
error: implementation of `MethodImplementation` is not general enough
2-
--> ui/fn_ptr_reference_method2.rs:12:9
2+
--> ui/fn_ptr_reference_method2.rs
33
|
4-
12 | builder.add_method(sel!(first:), my_fn as extern "C" fn(&Object, _, _));
4+
| builder.add_method(sel!(first:), my_fn as extern "C" fn(&Object, _, _));
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `MethodImplementation` is not general enough
66
|
77
= note: `MethodImplementation` would have to be implemented for the type `for<'r> extern "C" fn(&'r objc2::runtime::Object, objc2::runtime::Sel, &objc2::runtime::Object)`
88
= note: ...but `MethodImplementation` is actually implemented for the type `extern "C" fn(&'0 objc2::runtime::Object, objc2::runtime::Sel, &objc2::runtime::Object)`, for some specific lifetime `'0`
99

1010
error: implementation of `MethodImplementation` is not general enough
11-
--> ui/fn_ptr_reference_method2.rs:13:9
11+
--> ui/fn_ptr_reference_method2.rs
1212
|
13-
13 | builder.add_method(sel!(both:), my_fn as extern "C" fn(&Object, Sel, &Object));
13+
| builder.add_method(sel!(both:), my_fn as extern "C" fn(&Object, Sel, &Object));
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `MethodImplementation` is not general enough
1515
|
1616
= note: `MethodImplementation` would have to be implemented for the type `for<'r, 's> extern "C" fn(&'r objc2::runtime::Object, objc2::runtime::Sel, &'s objc2::runtime::Object)`
1717
= note: ...but `MethodImplementation` is actually implemented for the type `extern "C" fn(&'0 objc2::runtime::Object, objc2::runtime::Sel, &objc2::runtime::Object)`, for some specific lifetime `'0`
1818

1919
error: implementation of `MethodImplementation` is not general enough
20-
--> ui/fn_ptr_reference_method2.rs:13:9
20+
--> ui/fn_ptr_reference_method2.rs
2121
|
22-
13 | builder.add_method(sel!(both:), my_fn as extern "C" fn(&Object, Sel, &Object));
22+
| builder.add_method(sel!(both:), my_fn as extern "C" fn(&Object, Sel, &Object));
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `MethodImplementation` is not general enough
2424
|
2525
= note: `MethodImplementation` would have to be implemented for the type `for<'r, 's> extern "C" fn(&'r objc2::runtime::Object, objc2::runtime::Sel, &'s objc2::runtime::Object)`

test-ui/ui/global_block_not_encode.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
error[E0277]: the trait bound `Box<i32>: objc2_encode::encode::Encode` is not satisfied
2-
--> ui/global_block_not_encode.rs:3:1
2+
--> ui/global_block_not_encode.rs
33
|
4-
3 | / global_block! {
5-
4 | | pub static BLOCK = |_b: Box<i32>| {};
6-
5 | | }
4+
| / global_block! {
5+
| | pub static BLOCK = |_b: Box<i32>| {};
6+
| | }
77
| |_^ the trait `objc2_encode::encode::Encode` is not implemented for `Box<i32>`
88
|
99
= help: the following other types implement trait `objc2_encode::encode::Encode`:

test-ui/ui/invalid_msg_send.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
error: unexpected end of macro invocation
2-
--> ui/invalid_msg_send.rs:9:39
2+
--> ui/invalid_msg_send.rs
33
|
4-
9 | let _: () = unsafe { msg_send![obj] };
4+
| let _: () = unsafe { msg_send![obj] };
55
| ^ missing tokens in macro arguments
66

77
error: unexpected end of macro invocation
8-
--> ui/invalid_msg_send.rs:10:40
8+
--> ui/invalid_msg_send.rs
99
|
10-
10 | let _: () = unsafe { msg_send![obj,] };
10+
| let _: () = unsafe { msg_send![obj,] };
1111
| ^ missing tokens in macro arguments
1212

1313
error: unexpected end of macro invocation
14-
--> ui/invalid_msg_send.rs:11:43
14+
--> ui/invalid_msg_send.rs
1515
|
16-
11 | let _: () = unsafe { msg_send![obj, a:] };
16+
| let _: () = unsafe { msg_send![obj, a:] };
1717
| ^ missing tokens in macro arguments
1818

1919
error: unexpected end of macro invocation
20-
--> ui/invalid_msg_send.rs:12:47
20+
--> ui/invalid_msg_send.rs
2121
|
22-
12 | let _: () = unsafe { msg_send![obj, a: b c] };
22+
| let _: () = unsafe { msg_send![obj, a: b c] };
2323
| ^ missing tokens in macro arguments
2424

2525
error: no rules expected the token `d`
26-
--> ui/invalid_msg_send.rs:14:49
26+
--> ui/invalid_msg_send.rs
2727
|
28-
14 | let _: () = unsafe { msg_send![obj, a: b, c d] };
28+
| let _: () = unsafe { msg_send![obj, a: b, c d] };
2929
| ^ no rules expected this token in macro call
3030

3131
error[E0412]: cannot find type `c` in this scope
32-
--> ui/invalid_msg_send.rs:13:47
32+
--> ui/invalid_msg_send.rs
3333
|
34-
13 | let _: () = unsafe { msg_send![obj, a: b: c] };
34+
| let _: () = unsafe { msg_send![obj, a: b: c] };
3535
| ^ expecting a type here because of type ascription
3636

3737
error[E0412]: cannot find type `c` in this scope
38-
--> ui/invalid_msg_send.rs:15:47
38+
--> ui/invalid_msg_send.rs
3939
|
40-
15 | let _: () = unsafe { msg_send![obj, a: b: c] };
40+
| let _: () = unsafe { msg_send![obj, a: b: c] };
4141
| ^ expecting a type here because of type ascription
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0433]: failed to resolve: there are too many leading `super` keywords
2-
--> ui/invalid_msg_send_super.rs:9:36
2+
--> ui/invalid_msg_send_super.rs
33
|
4-
9 | let _: () = unsafe { msg_send![super, init] };
4+
| let _: () = unsafe { msg_send![super, init] };
55
| ^^^^^ there are too many leading `super` keywords
66

77
error[E0433]: failed to resolve: there are too many leading `super` keywords
8-
--> ui/invalid_msg_send_super.rs:10:36
8+
--> ui/invalid_msg_send_super.rs
99
|
10-
10 | let _: () = unsafe { msg_send![super(), init] };
10+
| let _: () = unsafe { msg_send![super(), init] };
1111
| ^^^^^ there are too many leading `super` keywords
1212

1313
error[E0433]: failed to resolve: there are too many leading `super` keywords
14-
--> ui/invalid_msg_send_super.rs:11:36
14+
--> ui/invalid_msg_send_super.rs
1515
|
16-
11 | let _: () = unsafe { msg_send![super(obj), init] };
16+
| let _: () = unsafe { msg_send![super(obj), init] };
1717
| ^^^^^ there are too many leading `super` keywords
1818

1919
error[E0433]: failed to resolve: there are too many leading `super` keywords
20-
--> ui/invalid_msg_send_super.rs:12:36
20+
--> ui/invalid_msg_send_super.rs
2121
|
22-
12 | let _: () = unsafe { msg_send![super(obj,), init] };
22+
| let _: () = unsafe { msg_send![super(obj,), init] };
2323
| ^^^^^ there are too many leading `super` keywords
2424

2525
error[E0433]: failed to resolve: there are too many leading `super` keywords
26-
--> ui/invalid_msg_send_super.rs:13:36
26+
--> ui/invalid_msg_send_super.rs
2727
|
28-
13 | let _: () = unsafe { msg_send![super(obj, superclass,), init] };
28+
| let _: () = unsafe { msg_send![super(obj, superclass,), init] };
2929
| ^^^^^ there are too many leading `super` keywords

test-ui/ui/invalid_sel.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: unexpected end of macro invocation
2-
--> ui/invalid_sel.rs:5:5
2+
--> ui/invalid_sel.rs
33
|
4-
5 | sel!();
4+
| sel!();
55
| ^^^^^^ missing tokens in macro arguments
66

77
error: unexpected end of macro invocation
8-
--> ui/invalid_sel.rs:6:14
8+
--> ui/invalid_sel.rs
99
|
10-
6 | sel!(a: b);
10+
| sel!(a: b);
1111
| ^ missing tokens in macro arguments
1212

1313
error: unexpected end of macro invocation
14-
--> ui/invalid_sel.rs:7:17
14+
--> ui/invalid_sel.rs
1515
|
16-
7 | sel!(a: b: c);
16+
| sel!(a: b: c);
1717
| ^ missing tokens in macro arguments
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0277]: `*mut ()` cannot be shared between threads safely
2-
--> ui/mainthreadmarker_not_send_sync.rs:8:5
2+
--> ui/mainthreadmarker_not_send_sync.rs
33
|
4-
8 | needs_sync::<MainThreadMarker>();
4+
| needs_sync::<MainThreadMarker>();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
66
|
77
= help: within `MainThreadMarker`, the trait `Sync` is not implemented for `*mut ()`
88
= note: required because it appears within the type `PhantomData<*mut ()>`
99
= note: required because it appears within the type `MainThreadMarker`
1010
note: required by a bound in `needs_sync`
11-
--> ui/mainthreadmarker_not_send_sync.rs:4:18
11+
--> ui/mainthreadmarker_not_send_sync.rs
1212
|
13-
4 | fn needs_sync<T: Sync>() {}
13+
| fn needs_sync<T: Sync>() {}
1414
| ^^^^ required by this bound in `needs_sync`
1515

1616
error[E0277]: `*mut ()` cannot be sent between threads safely
17-
--> ui/mainthreadmarker_not_send_sync.rs:9:5
17+
--> ui/mainthreadmarker_not_send_sync.rs
1818
|
19-
9 | needs_send::<MainThreadMarker>();
19+
| needs_send::<MainThreadMarker>();
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be sent between threads safely
2121
|
2222
= help: within `MainThreadMarker`, the trait `Send` is not implemented for `*mut ()`
2323
= note: required because it appears within the type `PhantomData<*mut ()>`
2424
= note: required because it appears within the type `MainThreadMarker`
2525
note: required by a bound in `needs_send`
26-
--> ui/mainthreadmarker_not_send_sync.rs:5:18
26+
--> ui/mainthreadmarker_not_send_sync.rs
2727
|
28-
5 | fn needs_send<T: Send>() {}
28+
| fn needs_send<T: Send>() {}
2929
| ^^^^ required by this bound in `needs_send`

0 commit comments

Comments
 (0)