You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of returning the type of the last element we flip it around and
return types of all elements _except_ the last one. This matches the
the constraint on tuple types which says that only the last element
can be unsized.
= help: `Struct` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
10
10
11
-
error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
| ^^^^^^^^^^^^^^ ------------ this returned value is of type `(usize, (dyn Trait + 'static))`
16
-
| |
17
-
| doesn't have a size known at compile-time
18
-
|
19
-
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
20
-
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
21
-
= note: the return type of a function must have a statically known size
= help: `Struct` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
32
20
33
-
error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
| ^^^^^^^^^^^^^^^^^^ ------------ this returned value is of type `(usize, (dyn Trait + 'static))`
38
-
| |
39
-
| doesn't have a size known at compile-time
40
-
|
41
-
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
42
-
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
43
-
= note: the return type of a function must have a statically known size
44
-
45
21
error[E0746]: return type cannot have an unboxed trait object
| ^^^^^^^^^ doesn't have a size known at compile-time
38
+
|
39
+
= help: within `((dyn FnOnce() -> u8 + 'static), u8)`, the trait `Sized` is not implemented for `(dyn FnOnce() -> u8 + 'static)`, which is required by `((dyn FnOnce() -> u8 + 'static), u8): Sized`
40
+
= note: required because it appears within the type `((dyn FnOnce() -> u8 + 'static), u8)`
41
+
= note: constant expressions must have a statically known size
42
+
43
+
error: aborting due to 5 previous errors
44
+
45
+
Some errors have detailed explanations: E0277, E0425.
46
+
For more information about an error, try `rustc --explain E0277`.
0 commit comments