about summary refs log tree commit diff
path: root/tests/ui/associated-types/issue-59324.stderr
blob: 3e2b0f4188973d1e62f975b0aaf8ec8e39777560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
error[E0277]: the trait bound `Bug: Foo` is not satisfied
  --> $DIR/issue-59324.rs:11:1
   |
LL | / pub trait ThriftService<Bug: NotFoo>:
LL | |
LL | |     Service<AssocType = <Bug as Foo>::OnlyFoo>
   | |______________________________________________^ the trait `Foo` is not implemented for `Bug`
   |
help: consider further restricting type parameter `Bug` with trait `Foo`
   |
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
   |                                     +++++

error[E0277]: the trait bound `Bug: Foo` is not satisfied
  --> $DIR/issue-59324.rs:13:13
   |
LL |     Service<AssocType = <Bug as Foo>::OnlyFoo>
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
   |
help: consider further restricting type parameter `Bug` with trait `Foo`
   |
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 | |
LL | |         &self,
LL | |     ) -> Self::AssocType;
   | |_________________________^ the trait `Foo` is not implemented for `Bug`

error[E0277]: the trait bound `(): Foo` is not satisfied
  --> $DIR/issue-59324.rs:24: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:16:5
   |
LL | /     fn get_service(
LL | |
LL | |
LL | |         &self,
LL | |     ) -> Self::AssocType;
   | |_________________________^ the trait `Foo` is not implemented for `Bug`
   |
help: consider further restricting type parameter `Bug` with trait `Foo`
   |
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
   |                                     +++++

error[E0277]: the trait bound `Bug: Foo` is not satisfied
  --> $DIR/issue-59324.rs:20:10
   |
LL |     ) -> Self::AssocType;
   |          ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
   |
help: consider further restricting type parameter `Bug` with trait `Foo`
   |
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
   |                                     +++++

error[E0277]: the trait bound `(): Foo` is not satisfied
  --> $DIR/issue-59324.rs:24: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 {
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
  --> $DIR/issue-59324.rs:24:29
   |
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: dyn ThriftService<()>) {}
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 8 previous errors

For more information about this error, try `rustc --explain E0277`.