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