Skip to content

Commit 16bfead

Browse files
committed
Bless tests
1 parent 9f480fa commit 16bfead

File tree

7 files changed

+20
-31
lines changed

7 files changed

+20
-31
lines changed

src/test/ui/async-await/issue-98634.rs

-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,5 @@ fn main() {
4545
StructAsync { callback }.await;
4646
//~^ ERROR expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
4747
//~| ERROR expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
48-
//~| ERROR expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
4948
});
5049
}

src/test/ui/async-await/issue-98634.stderr

+1-20
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,6 @@ note: required by a bound in `StructAsync`
1717
LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
1919

20-
error[E0271]: expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
21-
--> $DIR/issue-98634.rs:45:9
22-
|
23-
LL | StructAsync { callback }.await;
24-
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Pin`, found opaque type
25-
|
26-
note: while checking the return type of the `async fn`
27-
--> $DIR/issue-98634.rs:24:21
28-
|
29-
LL | async fn callback() {}
30-
| ^ checked the `Output` of this `async fn`, found opaque type
31-
= note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
32-
found opaque type `impl Future<Output = ()>`
33-
note: required by a bound in `StructAsync`
34-
--> $DIR/issue-98634.rs:9:35
35-
|
36-
LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
37-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
38-
3920
error[E0271]: expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
4021
--> $DIR/issue-98634.rs:45:33
4122
|
@@ -55,6 +36,6 @@ note: required by a bound in `StructAsync`
5536
LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
5637
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
5738

58-
error: aborting due to 3 previous errors
39+
error: aborting due to 2 previous errors
5940

6041
For more information about this error, try `rustc --explain E0271`.

src/test/ui/duplicate_entry_error.stderr

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/duplicate_entry_error.rs:11:1
33
|
4-
LL | fn panic_impl(info: &PanicInfo) -> ! {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | / fn panic_impl(info: &PanicInfo) -> ! {
5+
LL | |
6+
LL | | loop {}
7+
LL | | }
8+
| |_^
69
|
710
= note: the lang item is first defined in crate `std` (which `duplicate_entry_error` depends on)
811
= note: first definition in `std` loaded from SYSROOT/libstd-*.rlib

src/test/ui/error-codes/E0152.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0152]: found duplicate lang item `owned_box`
22
--> $DIR/E0152.rs:5:1
33
|
44
LL | struct Foo<T>(T);
5-
| ^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^
66
|
77
= note: the lang item is first defined in crate `alloc` (which `std` depends on)
88
= note: first definition in `alloc` loaded from SYSROOT/liballoc-*.rlib

src/test/ui/panic-handler/panic-handler-duplicate.stderr

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/panic-handler-duplicate.rs:15:1
33
|
4-
LL | fn panic2(info: &PanicInfo) -> ! {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | / fn panic2(info: &PanicInfo) -> ! {
5+
LL | | loop {}
6+
LL | | }
7+
| |_^
68
|
79
note: the lang item is first defined here
810
--> $DIR/panic-handler-duplicate.rs:10:1
911
|
10-
LL | fn panic(info: &PanicInfo) -> ! {
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
LL | / fn panic(info: &PanicInfo) -> ! {
13+
LL | | loop {}
14+
LL | | }
15+
| |_^
1216

1317
error: aborting due to previous error
1418

src/test/ui/panic-handler/panic-handler-std.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/panic-handler-std.rs:8:1
33
|
4-
LL | fn panic(info: PanicInfo) -> ! {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | / fn panic(info: PanicInfo) -> ! {
5+
LL | | loop {}
6+
LL | | }
7+
| |_^
68
|
79
= note: the lang item is first defined in crate `std` (which `panic_handler_std` depends on)
810
= note: first definition in `std` loaded from SYSROOT/libstd-*.rlib

src/test/ui/traits/issue-102989.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ error[E0152]: found duplicate lang item `sized`
2222
--> $DIR/issue-102989.rs:5:1
2323
|
2424
LL | trait Sized { }
25-
| ^^^^^^^^^^^
25+
| ^^^^^^^^^^^^^^^
2626
|
2727
= note: the lang item is first defined in crate `core` (which `std` depends on)
2828
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib

0 commit comments

Comments
 (0)