@@ -14,15 +14,17 @@ error[E0308]: mismatched types
1414 --> tests/ui/async_instrument.rs:10:5
1515 |
161610 | ""
17- | ^^- help: try using a conversion method: `.to_string()`
18- | |
19- | expected `String`, found `&str`
17+ | ^^ expected `String`, found `&str`
2018 |
2119note: return type inferred to be `String` here
2220 --> tests/ui/async_instrument.rs:9:31
2321 |
24- 9 | async fn simple_mismatch() -> String {
22+ 9 | async fn simple_mismatch() -> String {
2523 | ^^^^^^
24+ help: try using a conversion method
25+ |
26+ 10 | "".to_string()
27+ | ++++++++++++
2628
2729error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
2830 --> tests/ui/async_instrument.rs:14:57
@@ -33,20 +35,14 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
333516 | | }
3436 | | ^
3537 | | |
36- | |_`(&str,)` cannot be formatted with the default formatter
38+ | |_the trait `std::fmt::Display` is not implemented for `(&str,)`
3739 | return type was inferred to be `(&str,)` here
38- |
39- = help: the trait `std::fmt::Display` is not implemented for `(&str,)`
40- = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
4140
4241error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
4342 --> tests/ui/async_instrument.rs:14:34
4443 |
454414 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
46- | ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
47- |
48- = help: the trait `std::fmt::Display` is not implemented for `(&str,)`
49- = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
45+ | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `(&str,)`
5046
5147error[E0308]: mismatched types
5248 --> tests/ui/async_instrument.rs:22:5
@@ -82,15 +78,17 @@ error[E0308]: mismatched types
8278 --> tests/ui/async_instrument.rs:35:16
8379 |
848035 | return "";
85- | ^^- help: try using a conversion method: `.to_string()`
86- | |
87- | expected `String`, found `&str`
81+ | ^^ expected `String`, found `&str`
8882 |
8983note: return type inferred to be `String` here
9084 --> tests/ui/async_instrument.rs:33:28
9185 |
928633 | async fn early_return() -> String {
9387 | ^^^^^^
88+ help: try using a conversion method
89+ |
90+ 35 | return "".to_string();
91+ | ++++++++++++
9492
9593error[E0308]: mismatched types
9694 --> tests/ui/async_instrument.rs:40:1
0 commit comments