Files
rust/tests/ui/impl-trait/issues/issue-84073.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
1.1 KiB
Plaintext
Raw Normal View History

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
|
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());
| ^^^^ 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
error: aborting due to 1 previous error
2022-02-17 13:55:58 +00:00
For more information about this error, try `rustc --explain E0599`.