1error[E0308]: mismatched types
2 --> tests/ui/async_instrument.rs:5:5
3  |
45 |     ""
5  |     ^^ expected `()`, found `&str`
6  |
7note: return type inferred to be `()` here
8 --> tests/ui/async_instrument.rs:4:10
9  |
104 | async fn unit() {
11  |          ^^^^
12
13error[E0308]: mismatched types
14  --> tests/ui/async_instrument.rs:10:5
15   |
1610 |     ""
17   |     ^^- help: try using a conversion method: `.to_string()`
18   |     |
19   |     expected `String`, found `&str`
20   |
21note: return type inferred to be `String` here
22  --> tests/ui/async_instrument.rs:9:31
23   |
249  | async fn simple_mismatch() -> String {
25   |                               ^^^^^^
26
27error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
28  --> tests/ui/async_instrument.rs:14:1
29   |
3014 | #[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
37error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
38  --> tests/ui/async_instrument.rs:15:34
39   |
4015 | 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
46error[E0308]: mismatched types
47  --> tests/ui/async_instrument.rs:23:5
48   |
4923 |     ""
50   |     ^^ expected `Wrapper<_>`, found `&str`
51   |
52   = note: expected struct `Wrapper<_>`
53           found reference `&'static str`
54note: return type inferred to be `Wrapper<_>` here
55  --> tests/ui/async_instrument.rs:22:36
56   |
5722 | async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> {
58   |                                    ^^^^^^^
59help: try wrapping the expression in `Wrapper`
60   |
6123 |     Wrapper("")
62   |     ++++++++  +
63
64error[E0308]: mismatched types
65  --> tests/ui/async_instrument.rs:29:16
66   |
6729 |         return "";
68   |                ^^ expected `()`, found `&str`
69   |
70note: return type inferred to be `()` here
71  --> tests/ui/async_instrument.rs:27:10
72   |
7327 | async fn early_return_unit() {
74   |          ^^^^^^^^^^^^^^^^^
75
76error[E0308]: mismatched types
77  --> tests/ui/async_instrument.rs:36:16
78   |
7936 |         return "";
80   |                ^^- help: try using a conversion method: `.to_string()`
81   |                |
82   |                expected `String`, found `&str`
83   |
84note: return type inferred to be `String` here
85  --> tests/ui/async_instrument.rs:34:28
86   |
8734 | async fn early_return() -> String {
88   |                            ^^^^^^
89
90error[E0308]: mismatched types
91  --> tests/ui/async_instrument.rs:42:35
92   |
9342 |   async fn extra_semicolon() -> i32 {
94   |  ___________________________________^
9543 | |     1;
96   | |      - help: remove this semicolon to return this value
9744 | | }
98   | |_^ expected `i32`, found `()`
99