1
1
error[E0308]: mismatched types
2
- --> tests/ui/async_instrument.rs:5:5
2
+ --> tests/ui/fail/ async_instrument.rs:5:5
3
3
|
4
4
5 | ""
5
5
| ^^ expected `()`, found `&str`
6
6
|
7
7
note: return type inferred to be `()` here
8
- --> tests/ui/async_instrument.rs:4:10
8
+ --> tests/ui/fail/ async_instrument.rs:4:10
9
9
|
10
10
4 | async fn unit() {
11
11
| ^^^^
12
12
13
13
error[E0308]: mismatched types
14
- --> tests/ui/async_instrument.rs:10:5
14
+ --> tests/ui/fail/ async_instrument.rs:10:5
15
15
|
16
16
10 | ""
17
17
| ^^- help: try using a conversion method: `.to_string()`
18
18
| |
19
19
| expected `String`, found `&str`
20
20
|
21
21
note: return type inferred to be `String` here
22
- --> tests/ui/async_instrument.rs:9:31
22
+ --> tests/ui/fail/ async_instrument.rs:9:31
23
23
|
24
24
9 | async fn simple_mismatch() -> String {
25
25
| ^^^^^^
26
26
27
27
error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
28
- --> tests/ui/async_instrument.rs:14:57
28
+ --> tests/ui/fail/ async_instrument.rs:14:57
29
29
|
30
30
14 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
31
31
| _________________________________________________________-
@@ -40,7 +40,7 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
40
40
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
41
41
42
42
error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
43
- --> tests/ui/async_instrument.rs:14:34
43
+ --> tests/ui/fail/ async_instrument.rs:14:34
44
44
|
45
45
14 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
46
46
| ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
@@ -49,15 +49,15 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
49
49
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
50
50
51
51
error[E0308]: mismatched types
52
- --> tests/ui/async_instrument.rs:22:5
52
+ --> tests/ui/fail/ async_instrument.rs:22:5
53
53
|
54
54
22 | ""
55
55
| ^^ expected `Wrapper<_>`, found `&str`
56
56
|
57
57
= note: expected struct `Wrapper<_>`
58
58
found reference `&'static str`
59
59
note: return type inferred to be `Wrapper<_>` here
60
- --> tests/ui/async_instrument.rs:21:36
60
+ --> tests/ui/fail/ async_instrument.rs:21:36
61
61
|
62
62
21 | async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> {
63
63
| ^^^^^^^
@@ -67,33 +67,33 @@ help: try wrapping the expression in `Wrapper`
67
67
| ++++++++ +
68
68
69
69
error[E0308]: mismatched types
70
- --> tests/ui/async_instrument.rs:28:16
70
+ --> tests/ui/fail/ async_instrument.rs:28:16
71
71
|
72
72
28 | return "";
73
73
| ^^ expected `()`, found `&str`
74
74
|
75
75
note: return type inferred to be `()` here
76
- --> tests/ui/async_instrument.rs:26:10
76
+ --> tests/ui/fail/ async_instrument.rs:26:10
77
77
|
78
78
26 | async fn early_return_unit() {
79
79
| ^^^^^^^^^^^^^^^^^
80
80
81
81
error[E0308]: mismatched types
82
- --> tests/ui/async_instrument.rs:35:16
82
+ --> tests/ui/fail/ async_instrument.rs:35:16
83
83
|
84
84
35 | return "";
85
85
| ^^- help: try using a conversion method: `.to_string()`
86
86
| |
87
87
| expected `String`, found `&str`
88
88
|
89
89
note: return type inferred to be `String` here
90
- --> tests/ui/async_instrument.rs:33:28
90
+ --> tests/ui/fail/ async_instrument.rs:33:28
91
91
|
92
92
33 | async fn early_return() -> String {
93
93
| ^^^^^^
94
94
95
95
error[E0308]: mismatched types
96
- --> tests/ui/async_instrument.rs:40:1
96
+ --> tests/ui/fail/ async_instrument.rs:40:1
97
97
|
98
98
40 | #[tracing::instrument]
99
99
| ^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `()`
0 commit comments