about summary refs log tree commit diff
path: root/tests/ui/traits/unconstrained-projection-normalization-2.next.stderr
blob: 2da655afa935c177cd3cbc4b510138a000f5bca3 (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
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
  --> $DIR/unconstrained-projection-normalization-2.rs:14:6
   |
LL | impl<T: ?Sized> Every for Thing {
   |      ^ unconstrained type parameter

error[E0277]: the size for values of type `T` cannot be known at compilation time
  --> $DIR/unconstrained-projection-normalization-2.rs:16:18
   |
LL | impl<T: ?Sized> Every for Thing {
   |      - this type parameter needs to be `Sized`
LL |
LL |     type Assoc = T;
   |                  ^ doesn't have a size known at compile-time
   |
note: required by a bound in `Every::Assoc`
  --> $DIR/unconstrained-projection-normalization-2.rs:12:5
   |
LL |     type Assoc;
   |     ^^^^^^^^^^^ required by this bound in `Every::Assoc`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - impl<T: ?Sized> Every for Thing {
LL + impl<T> Every for Thing {
   |
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Assoc: ?Sized;
   |               ++++++++

error[E0282]: type annotations needed
  --> $DIR/unconstrained-projection-normalization-2.rs:20:11
   |
LL | fn foo(_: <Thing as Every>::Assoc) {}
   |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for associated type `<Thing as Every>::Assoc`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0207, E0277, E0282.
For more information about an error, try `rustc --explain E0207`.