rust/tests/ui/associated-types/issue-59324.stderr

101 lines
3.3 KiB
Plaintext

error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:11:1
|
LL | / pub trait ThriftService<Bug: NotFoo>:
LL | |
LL | |
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
| |______________________________________________^ the trait `Foo` is not implemented for `Bug`
|
help: consider further restricting this bound
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
| +++++
error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:11:1
|
LL | / pub trait ThriftService<Bug: NotFoo>:
LL | |
LL | |
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
... |
LL | |
LL | | }
| |_^ the trait `Foo` is not implemented for `Bug`
|
help: consider further restricting this bound
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
| +++++
error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:16:5
|
LL | / fn get_service(
LL | |
LL | | &self,
LL | | ) -> Self::AssocType;
| |_________________________^ the trait `Foo` is not implemented for `Bug`
|
help: consider further restricting this bound
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
| +++++
error[E0277]: the trait bound `(): Foo` is not satisfied
--> $DIR/issue-59324.rs:23:29
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-59324.rs:3:1
|
LL | pub trait Foo: NotFoo {
| ^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:19:10
|
LL | ) -> Self::AssocType;
| ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
|
help: consider further restricting this bound
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
| +++++
error[E0277]: the trait bound `(): Foo` is not satisfied
--> $DIR/issue-59324.rs:23:52
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^ the trait `Foo` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-59324.rs:3:1
|
LL | pub trait Foo: NotFoo {
| ^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
--> $DIR/issue-59324.rs:23:20
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn ThriftService<(), AssocType = _> + 'static)`
= help: unsized fn params are gated as an unstable feature
help: you can use `impl Trait` as the argument type
|
LL | fn with_factory<H>(factory: impl ThriftService<()>) {}
| ~~~~
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn with_factory<H>(factory: &dyn ThriftService<()>) {}
| +
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0277`.