@@ -18,7 +18,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
18
18
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
19
19
= note: the return type of a function must have a statically known size
20
20
21
- error[E0746]: return type cannot have an unboxed trait object
21
+ error[E0746]: return type cannot be a trait object without pointer indirection
22
22
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13
23
23
|
24
24
LL | fn bap() -> Trait { Struct }
@@ -33,7 +33,7 @@ help: alternatively, box the return type, and wrap all of the returned values in
33
33
LL | fn bap() -> Box<dyn Trait> { Box::new(Struct) }
34
34
| +++++++ + +++++++++ +
35
35
36
- error[E0746]: return type cannot have an unboxed trait object
36
+ error[E0746]: return type cannot be a trait object without pointer indirection
37
37
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:17:13
38
38
|
39
39
LL | fn ban() -> dyn Trait { Struct }
@@ -48,7 +48,7 @@ help: alternatively, box the return type, and wrap all of the returned values in
48
48
LL | fn ban() -> Box<dyn Trait> { Box::new(Struct) }
49
49
| ++++ + +++++++++ +
50
50
51
- error[E0746]: return type cannot have an unboxed trait object
51
+ error[E0746]: return type cannot be a trait object without pointer indirection
52
52
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13
53
53
|
54
54
LL | fn bak() -> dyn Trait { unimplemented!() }
@@ -63,7 +63,7 @@ help: alternatively, box the return type, and wrap all of the returned values in
63
63
LL | fn bak() -> Box<dyn Trait> { Box::new(unimplemented!()) }
64
64
| ++++ + +++++++++ +
65
65
66
- error[E0746]: return type cannot have an unboxed trait object
66
+ error[E0746]: return type cannot be a trait object without pointer indirection
67
67
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:21:13
68
68
|
69
69
LL | fn bal() -> dyn Trait {
82
82
LL ~ Box::new(42)
83
83
|
84
84
85
- error[E0746]: return type cannot have an unboxed trait object
85
+ error[E0746]: return type cannot be a trait object without pointer indirection
86
86
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:27:13
87
87
|
88
88
LL | fn bax() -> dyn Trait {
@@ -101,7 +101,7 @@ LL | } else {
101
101
LL ~ Box::new(42)
102
102
|
103
103
104
- error[E0746]: return type cannot have an unboxed trait object
104
+ error[E0746]: return type cannot be a trait object without pointer indirection
105
105
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:62:13
106
106
|
107
107
LL | fn bat() -> dyn Trait {
@@ -120,7 +120,7 @@ LL | }
120
120
LL ~ Box::new(42)
121
121
|
122
122
123
- error[E0746]: return type cannot have an unboxed trait object
123
+ error[E0746]: return type cannot be a trait object without pointer indirection
124
124
--> $DIR/dyn-trait-return-should-be-impl-trait.rs:68:13
125
125
|
126
126
LL | fn bay() -> dyn Trait {
0 commit comments