|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> tests/ui/async_instrument.rs:5:5 |
| 3 | + | |
| 4 | +5 | "" |
| 5 | + | ^^ expected `()`, found `&str` |
| 6 | + |
| 7 | +error[E0308]: mismatched types |
| 8 | + --> tests/ui/async_instrument.rs:10:5 |
| 9 | + | |
| 10 | +10 | "" |
| 11 | + | ^^- help: try using a conversion method: `.to_string()` |
| 12 | + | | |
| 13 | + | expected struct `String`, found `&str` |
| 14 | + | |
| 15 | +note: return type inferred to be `String` here |
| 16 | + --> tests/ui/async_instrument.rs:9:31 |
| 17 | + | |
| 18 | +9 | async fn simple_mismatch() -> String { |
| 19 | + | ^^^^^^ |
| 20 | + |
| 21 | +error[E0277]: `(&str,)` doesn't implement `std::fmt::Display` |
| 22 | + --> tests/ui/async_instrument.rs:14:1 |
| 23 | + | |
| 24 | +14 | #[tracing::instrument] |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter |
| 26 | + | |
| 27 | + = help: the trait `std::fmt::Display` is not implemented for `(&str,)` |
| 28 | + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 29 | + = note: this error originates in the attribute macro `tracing::instrument` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 30 | + |
| 31 | +error[E0277]: `(&str,)` doesn't implement `std::fmt::Display` |
| 32 | + --> tests/ui/async_instrument.rs:15:34 |
| 33 | + | |
| 34 | +15 | async fn opaque_unsatisfied() -> impl std::fmt::Display { |
| 35 | + | ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter |
| 36 | + | |
| 37 | + = help: the trait `std::fmt::Display` is not implemented for `(&str,)` |
| 38 | + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 39 | + |
| 40 | +error[E0308]: mismatched types |
| 41 | + --> tests/ui/async_instrument.rs:23:5 |
| 42 | + | |
| 43 | +23 | "" |
| 44 | + | ^^ expected struct `Wrapper`, found `&str` |
| 45 | + | |
| 46 | + = note: expected struct `Wrapper<_>` |
| 47 | + found reference `&'static str` |
| 48 | +note: return type inferred to be `Wrapper<_>` here |
| 49 | + --> tests/ui/async_instrument.rs:22:36 |
| 50 | + | |
| 51 | +22 | async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> { |
| 52 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 53 | +help: try wrapping the expression in `Wrapper` |
| 54 | + | |
| 55 | +23 | Wrapper("") |
| 56 | + | ++++++++ + |
0 commit comments