Skip to content

Commit aee6cd9

Browse files
committed
Fix nll tests
1 parent 9d15b6f commit aee6cd9

File tree

2 files changed

+24
-37
lines changed

2 files changed

+24
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,44 @@
11
error[E0631]: type mismatch in closure arguments
22
--> $DIR/expect-fn-supply-fn.rs:30:5
33
|
4-
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
6-
| |
7-
| expected signature of `fn(fn(&'a u32), &i32) -> _`
8-
|
9-
note: required by `with_closure_expecting_fn_with_free_region`
10-
--> $DIR/expect-fn-supply-fn.rs:1:1
11-
|
124
LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
135
LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32)
146
LL | | {
157
LL | | }
16-
| |_^
8+
| |_- required by `with_closure_expecting_fn_with_free_region`
9+
...
10+
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
12+
| |
13+
| expected signature of `fn(fn(&'a u32), &i32) -> _`
1714

1815
error[E0631]: type mismatch in closure arguments
1916
--> $DIR/expect-fn-supply-fn.rs:37:5
2017
|
21-
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
23-
| |
24-
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
25-
|
26-
note: required by `with_closure_expecting_fn_with_bound_region`
27-
--> $DIR/expect-fn-supply-fn.rs:6:1
28-
|
2918
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
3019
LL | | where F: FnOnce(fn(&u32), &i32)
3120
LL | | {
3221
LL | | }
33-
| |_^
22+
| |_- required by `with_closure_expecting_fn_with_bound_region`
23+
...
24+
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
25+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
26+
| |
27+
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
3428

3529
error[E0631]: type mismatch in closure arguments
3630
--> $DIR/expect-fn-supply-fn.rs:46:5
3731
|
38-
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
40-
| |
41-
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
42-
|
43-
note: required by `with_closure_expecting_fn_with_bound_region`
44-
--> $DIR/expect-fn-supply-fn.rs:6:1
45-
|
4632
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
4733
LL | | where F: FnOnce(fn(&u32), &i32)
4834
LL | | {
4935
LL | | }
50-
| |_^
36+
| |_- required by `with_closure_expecting_fn_with_bound_region`
37+
...
38+
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
40+
| |
41+
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
5142

5243
error: aborting due to 3 previous errors
5344

src/test/ui/kindck/kindck-send-object1.nll.stderr

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
22
--> $DIR/kindck-send-object1.rs:10:5
33
|
4+
LL | fn assert_send<T:Send+'static>() { }
5+
| -------------------------------- required by `assert_send`
6+
...
47
LL | assert_send::<&'a dyn Dummy>();
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
69
|
710
= help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
811
= note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
9-
note: required by `assert_send`
10-
--> $DIR/kindck-send-object1.rs:5:1
11-
|
12-
LL | fn assert_send<T:Send+'static>() { }
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1412

1513
error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
1614
--> $DIR/kindck-send-object1.rs:29:5
1715
|
16+
LL | fn assert_send<T:Send+'static>() { }
17+
| -------------------------------- required by `assert_send`
18+
...
1819
LL | assert_send::<Box<dyn Dummy + 'a>>();
1920
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
2021
|
2122
= help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
2223
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
2324
= note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>`
24-
note: required by `assert_send`
25-
--> $DIR/kindck-send-object1.rs:5:1
26-
|
27-
LL | fn assert_send<T:Send+'static>() { }
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2925

3026
error: aborting due to 2 previous errors
3127

0 commit comments

Comments
 (0)