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
error[E0277]: the trait bound `T: Unsize<U>` is not satisfied
2
+
--> $DIR/validate-unsize-cast.rs:10:42
3
+
|
4
+
LL | impl<T: ?Sized, U: ?Sized> CastTo<U> for T {}
5
+
| ^ the trait `Unsize<U>` is not implemented for `T`
6
+
|
7
+
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
8
+
note: required by a bound in `CastTo`
9
+
--> $DIR/validate-unsize-cast.rs:7:30
10
+
|
11
+
LL | pub trait CastTo<U: ?Sized>: Unsize<U> {}
12
+
| ^^^^^^^^^ required by this bound in `CastTo`
13
+
help: consider further restricting this bound
14
+
|
15
+
LL | impl<T: ?Sized + std::marker::Unsize<U>, U: ?Sized> CastTo<U> for T {}
16
+
| ++++++++++++++++++++++++
17
+
18
+
error: aborting due to 1 previous error
19
+
20
+
For more information about this error, try `rustc --explain E0277`.
0 commit comments