@@ -17,7 +17,7 @@ LL | 1u32
17
17
help: you could change the return type to be a boxed trait object
18
18
|
19
19
LL | fn foo() -> Box<dyn std::fmt::Display> {
20
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
20
+ | ^^^^^^^ ^
21
21
22
22
error[E0308]: mismatched types
23
23
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:12:16
@@ -38,7 +38,7 @@ LL | return 1u32;
38
38
help: you could change the return type to be a boxed trait object
39
39
|
40
40
LL | fn bar() -> Box<dyn std::fmt::Display> {
41
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
41
+ | ^^^^^^^ ^
42
42
43
43
error[E0308]: mismatched types
44
44
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:20:9
@@ -59,7 +59,7 @@ LL | 1u32
59
59
help: you could change the return type to be a boxed trait object
60
60
|
61
61
LL | fn baz() -> Box<dyn std::fmt::Display> {
62
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
62
+ | ^^^^^^^ ^
63
63
64
64
error[E0308]: `if` and `else` have incompatible types
65
65
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:28:9
@@ -76,7 +76,7 @@ LL | | }
76
76
help: you could change the return type to be a boxed trait object
77
77
|
78
78
LL | fn qux() -> Box<dyn std::fmt::Display> {
79
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
79
+ | ^^^^^^^ ^
80
80
help: if you change the return type to expect trait objects box the returned expressions
81
81
|
82
82
LL | Box::new(0i32)
@@ -102,7 +102,7 @@ LL | _ => 1u32,
102
102
help: you could change the return type to be a boxed trait object
103
103
|
104
104
LL | fn bat() -> Box<dyn std::fmt::Display> {
105
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
105
+ | ^^^^^^^ ^
106
106
107
107
error[E0308]: mismatched types
108
108
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:40:5
@@ -124,7 +124,7 @@ LL | | }
124
124
help: you could change the return type to be a boxed trait object
125
125
|
126
126
LL | fn can() -> Box<dyn std::fmt::Display> {
127
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
127
+ | ^^^^^^^ ^
128
128
129
129
error[E0308]: mismatched types
130
130
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:53:13
@@ -145,7 +145,7 @@ LL | 1u32
145
145
help: you could change the return type to be a boxed trait object
146
146
|
147
147
LL | fn cat() -> Box<dyn std::fmt::Display> {
148
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
148
+ | ^^^^^^^ ^
149
149
150
150
error[E0308]: `match` arms have incompatible types
151
151
--> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:61:14
@@ -162,7 +162,7 @@ LL | | }
162
162
help: you could change the return type to be a boxed trait object
163
163
|
164
164
LL | fn dog() -> Box<dyn std::fmt::Display> {
165
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^
165
+ | ^^^^^^^ ^
166
166
help: if you change the return type to expect trait objects box the returned expressions
167
167
|
168
168
LL | 0 => Box::new(0i32),
0 commit comments