2024-03-10 19:43:20 -04:00
|
|
|
error[E0599]: the method `when` exists for struct `RaceBuilder<_, Never<_>>`, but its trait bounds were not satisfied
|
|
|
|
|
--> $DIR/issue-84073.rs:32:27
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
2024-03-10 19:43:20 -04:00
|
|
|
LL | pub struct Never<T>(PhantomData<T>);
|
|
|
|
|
| ------------------- doesn't satisfy `Never<_>: StatefulFuture<Option<_>>`
|
|
|
|
|
...
|
|
|
|
|
LL | pub struct RaceBuilder<F, S> {
|
|
|
|
|
| ---------------------------- method `when` not found for this struct
|
|
|
|
|
...
|
2022-02-17 13:55:58 +00:00
|
|
|
LL | Race::new(|race| race.when());
|
2024-03-10 19:43:20 -04:00
|
|
|
| ^^^^ method cannot be called on `RaceBuilder<_, Never<_>>` due to unsatisfied trait bounds
|
|
|
|
|
|
|
|
|
|
|
note: trait bound `Never<_>: StatefulFuture<Option<_>>` was not satisfied
|
|
|
|
|
--> $DIR/issue-84073.rs:14:8
|
|
|
|
|
|
|
|
|
|
|
LL | impl<T, F> RaceBuilder<T, F>
|
|
|
|
|
| -----------------
|
|
|
|
|
LL | where
|
|
|
|
|
LL | F: StatefulFuture<Option<T>>,
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here
|
|
|
|
|
note: the trait `StatefulFuture` must be implemented
|
|
|
|
|
--> $DIR/issue-84073.rs:3:1
|
|
|
|
|
|
|
|
|
|
|
LL | pub trait StatefulFuture<S> {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-02-17 13:55:58 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2022-02-17 13:55:58 +00:00
|
|
|
|
2024-03-10 19:43:20 -04:00
|
|
|
For more information about this error, try `rustc --explain E0599`.
|