@@ -25,77 +25,80 @@ note: return type inferred to be `String` here
2525 | ^^^^^^
2626
2727error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
28- --> tests/ui/async_instrument.rs:14:1
28+ --> tests/ui/async_instrument.rs:14:57
2929 |
30- 14 | #[tracing::instrument]
31- | ^^^^^^^^^^^^^^^^^^^^^^
32- | |
33- | `(&str,)` cannot be formatted with the default formatter
34- | return type was inferred to be `(&str,)` here
30+ 14 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
31+ | _________________________________________________________-
32+ 15 | | ("",)
33+ 16 | | }
34+ | | ^
35+ | | |
36+ | |_`(&str,)` cannot be formatted with the default formatter
37+ | return type was inferred to be `(&str,)` here
3538 |
3639 = help: the trait `std::fmt::Display` is not implemented for `(&str,)`
3740 = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
38- = note: this error originates in the attribute macro `tracing::instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
3941
4042error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
41- --> tests/ui/async_instrument.rs:15 :34
43+ --> tests/ui/async_instrument.rs:14 :34
4244 |
43- 15 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
45+ 14 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
4446 | ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
4547 |
4648 = help: the trait `std::fmt::Display` is not implemented for `(&str,)`
4749 = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
4850
4951error[E0308]: mismatched types
50- --> tests/ui/async_instrument.rs:23 :5
52+ --> tests/ui/async_instrument.rs:22 :5
5153 |
52- 23 | ""
54+ 22 | ""
5355 | ^^ expected `Wrapper<_>`, found `&str`
5456 |
5557 = note: expected struct `Wrapper<_>`
5658 found reference `&'static str`
5759note: return type inferred to be `Wrapper<_>` here
58- --> tests/ui/async_instrument.rs:22 :36
60+ --> tests/ui/async_instrument.rs:21 :36
5961 |
60- 22 | async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> {
62+ 21 | async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> {
6163 | ^^^^^^^
6264help: try wrapping the expression in `Wrapper`
6365 |
64- 23 | Wrapper("")
66+ 22 | Wrapper("")
6567 | ++++++++ +
6668
6769error[E0308]: mismatched types
68- --> tests/ui/async_instrument.rs:29 :16
70+ --> tests/ui/async_instrument.rs:28 :16
6971 |
70- 29 | return "";
72+ 28 | return "";
7173 | ^^ expected `()`, found `&str`
7274 |
7375note: return type inferred to be `()` here
74- --> tests/ui/async_instrument.rs:27 :10
76+ --> tests/ui/async_instrument.rs:26 :10
7577 |
76- 27 | async fn early_return_unit() {
78+ 26 | async fn early_return_unit() {
7779 | ^^^^^^^^^^^^^^^^^
7880
7981error[E0308]: mismatched types
80- --> tests/ui/async_instrument.rs:36 :16
82+ --> tests/ui/async_instrument.rs:35 :16
8183 |
82- 36 | return "";
84+ 35 | return "";
8385 | ^^- help: try using a conversion method: `.to_string()`
8486 | |
8587 | expected `String`, found `&str`
8688 |
8789note: return type inferred to be `String` here
88- --> tests/ui/async_instrument.rs:34 :28
90+ --> tests/ui/async_instrument.rs:33 :28
8991 |
90- 34 | async fn early_return() -> String {
92+ 33 | async fn early_return() -> String {
9193 | ^^^^^^
9294
9395error[E0308]: mismatched types
94- --> tests/ui/async_instrument.rs:42:35
95- |
96- 42 | async fn extra_semicolon() -> i32 {
97- | ___________________________________^
98- 43 | | 1;
99- | | - help: remove this semicolon to return this value
100- 44 | | }
101- | |_^ expected `i32`, found `()`
96+ --> tests/ui/async_instrument.rs:40:1
97+ |
98+ 40 | #[tracing::instrument]
99+ | ^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `()`
100+ 41 | async fn extra_semicolon() -> i32 {
101+ 42 | 1;
102+ | - help: remove this semicolon to return this value
103+ |
104+ = note: this error originates in the attribute macro `tracing::instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments