Skip to content

Commit cfa6e91

Browse files
committed
Bless test that changed due to different rust compiler version.
Fix minor formatting.
1 parent e72c7d4 commit cfa6e91

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

tracing-attributes/tests/ui/async_instrument.stderr

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ error[E0308]: mismatched types
1414
--> tests/ui/async_instrument.rs:10:5
1515
|
1616
10 | ""
17-
| ^^- help: try using a conversion method: `.to_string()`
18-
| |
19-
| expected `String`, found `&str`
17+
| ^^ expected `String`, found `&str`
2018
|
2119
note: 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

2729
error[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`
3335
16 | | }
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

4241
error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
4342
--> tests/ui/async_instrument.rs:14:34
4443
|
4544
14 | 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

5147
error[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
|
8480
35 | return "";
85-
| ^^- help: try using a conversion method: `.to_string()`
86-
| |
87-
| expected `String`, found `&str`
81+
| ^^ expected `String`, found `&str`
8882
|
8983
note: return type inferred to be `String` here
9084
--> tests/ui/async_instrument.rs:33:28
9185
|
9286
33 | async fn early_return() -> String {
9387
| ^^^^^^
88+
help: try using a conversion method
89+
|
90+
35 | return "".to_string();
91+
| ++++++++++++
9492

9593
error[E0308]: mismatched types
9694
--> tests/ui/async_instrument.rs:40:1

tracing-core/src/field.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ mod test {
11141114

11151115
struct MyVisitor;
11161116
impl Visit for MyVisitor {
1117-
fn record_debug(&mut self, field: &Field, _: &dyn (core::fmt::Debug)) {
1117+
fn record_debug(&mut self, field: &Field, _: &dyn core::fmt::Debug) {
11181118
assert_eq!(field.callsite(), TEST_META_1.callsite())
11191119
}
11201120
}
@@ -1133,7 +1133,7 @@ mod test {
11331133

11341134
struct MyVisitor;
11351135
impl Visit for MyVisitor {
1136-
fn record_debug(&mut self, field: &Field, _: &dyn (core::fmt::Debug)) {
1136+
fn record_debug(&mut self, field: &Field, _: &dyn core::fmt::Debug) {
11371137
assert_eq!(field.name(), "bar")
11381138
}
11391139
}

0 commit comments

Comments
 (0)