Skip to content

Commit ff75124

Browse files
committed
fix nll tests
1 parent 7cef8b3 commit ff75124

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
11
error[E0631]: type mismatch in closure arguments
22
--> $DIR/expect-fn-supply-fn.rs:30:5
33
|
4-
LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
5-
LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32)
6-
LL | | {
7-
LL | | }
8-
| |_- required by `with_closure_expecting_fn_with_free_region`
4+
LL | fn with_closure_expecting_fn_with_free_region<F>(_: F)
5+
| ------------------------------------------
6+
LL | where F: for<'a> FnOnce(fn(&'a u32), &i32)
7+
| ------------------------- required by this bound in `with_closure_expecting_fn_with_free_region`
98
...
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) -> _`
9+
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
10+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
11+
| |
12+
| expected signature of `fn(fn(&'a u32), &i32) -> _`
1413

1514
error[E0631]: type mismatch in closure arguments
1615
--> $DIR/expect-fn-supply-fn.rs:37:5
1716
|
18-
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
19-
LL | | where F: FnOnce(fn(&u32), &i32)
20-
LL | | {
21-
LL | | }
22-
| |_- required by `with_closure_expecting_fn_with_bound_region`
17+
LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
18+
| -------------------------------------------
19+
LL | where F: FnOnce(fn(&u32), &i32)
20+
| ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
2321
...
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) -> _`
22+
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
24+
| |
25+
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
2826

2927
error[E0631]: type mismatch in closure arguments
3028
--> $DIR/expect-fn-supply-fn.rs:46:5
3129
|
32-
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
33-
LL | | where F: FnOnce(fn(&u32), &i32)
34-
LL | | {
35-
LL | | }
36-
| |_- required by `with_closure_expecting_fn_with_bound_region`
30+
LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
31+
| -------------------------------------------
32+
LL | where F: FnOnce(fn(&u32), &i32)
33+
| ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
3734
...
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) -> _`
35+
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
36+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
37+
| |
38+
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
4239

4340
error: aborting due to 3 previous errors
4441

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
22
--> $DIR/kindck-send-object1.rs:10:5
33
|
44
LL | fn assert_send<T:Send+'static>() { }
5-
| -------------------------------- required by `assert_send`
5+
| ----------- ---- required by this bound in `assert_send`
66
...
77
LL | assert_send::<&'a dyn Dummy>();
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
@@ -14,7 +14,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
1414
--> $DIR/kindck-send-object1.rs:29:5
1515
|
1616
LL | fn assert_send<T:Send+'static>() { }
17-
| -------------------------------- required by `assert_send`
17+
| ----------- ---- required by this bound in `assert_send`
1818
...
1919
LL | assert_send::<Box<dyn Dummy + 'a>>();
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely

0 commit comments

Comments
 (0)