Handle missing projection restriction
This commit is contained in:
parent
daa8491648
commit
5cc99eed04
13 changed files with 134 additions and 25 deletions
|
|
@ -1,11 +1,12 @@
|
|||
error[E0277]: `<P as Process<'_>>::Item` is not an iterator
|
||||
--> $DIR/issue-22872.rs:20:40
|
||||
|
|
||||
LL | fn push_process<P>(process: P) where P: Process<'static> {
|
||||
| - help: consider further restricting the associated type: `, <P as Process<'_>>::Item: std::iter::Iterator`
|
||||
LL | let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `<P as Process<'_>>::Item` is not an iterator
|
||||
|
|
||||
= help: the trait `std::iter::Iterator` is not implemented for `<P as Process<'_>>::Item`
|
||||
= help: consider adding a `where <P as Process<'_>>::Item: std::iter::Iterator` bound
|
||||
= note: required because of the requirements on the impl of `for<'b> Wrap<'b>` for `Wrapper<P>`
|
||||
= note: required for the cast to the object type `dyn for<'b> Wrap<'b>`
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@ error[E0277]: the size for values of type `<Self as std::ops::Deref>::Target` ca
|
|||
--> $DIR/issue-42312.rs:4:29
|
||||
|
|
||||
LL | fn baz(_: Self::Target) where Self: Deref {}
|
||||
| ^ doesn't have a size known at compile-time
|
||||
| ^ - help: consider further restricting the associated type: `, <Self as std::ops::Deref>::Target: std::marker::Sized`
|
||||
| |
|
||||
| doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `<Self as std::ops::Deref>::Target`
|
||||
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
|
||||
= help: consider adding a `where <Self as std::ops::Deref>::Target: std::marker::Sized` bound
|
||||
= note: all function arguments must have a statically known size
|
||||
= help: unsized locals are gated as an unstable feature
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue