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