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
Auto merge of rust-lang#130847 - matthiaskrgr:rollup-f0n80bw, r=matthiaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#130735 (Simple validation for unsize coercion in MIR validation)
- rust-lang#130781 (Fix up setting strip = true in Cargo.toml makes build scripts fail in…)
- rust-lang#130811 (add link from random() helper fn to extensive DefaultRandomSource docs)
- rust-lang#130819 (Add `must_use` attribute to `len_utf8` and `len_utf16`.)
- rust-lang#130832 (fix some cfg logic around optimize_for_size and 16-bit targets)
- rust-lang#130842 (Add tracking issue for io_error_inprogress)
r? `@ghost`
`@rustbot` modify labels: rollup
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