fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.6 KiB27 linesraw
1error[E0277]: the size for values of type `<Self as std::ops::Deref>::Target` cannot be known at compilation time
2  --> $DIR/issue-42312.rs:4:29
3   |
4LL |     fn baz(_: Self::Target) where Self: Deref {}
5   |                             ^                - help: consider further restricting the associated type: `, <Self as std::ops::Deref>::Target: std::marker::Sized`
6   |                             |
7   |                             doesn't have a size known at compile-time
8   |
9   = help: the trait `std::marker::Sized` is not implemented for `<Self as std::ops::Deref>::Target`
10   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
11   = note: all function arguments must have a statically known size
12   = help: unsized locals are gated as an unstable feature
13
14error[E0277]: the size for values of type `(dyn std::string::ToString + 'static)` cannot be known at compilation time
15  --> $DIR/issue-42312.rs:8:27
16   |
17LL | pub fn f(_: dyn ToString) {}
18   |                           ^ doesn't have a size known at compile-time
19   |
20   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::string::ToString + 'static)`
21   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
22   = note: all function arguments must have a statically known size
23   = help: unsized locals are gated as an unstable feature
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0277`.