File: issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (39 lines) | stat: -rw-r--r-- 1,993 bytes parent folder | download | duplicates (4)
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
error[E0277]: the size for values of type `(dyn Deref<Target = T> + 'static)` cannot be known at compilation time
  --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:10:23
   |
LL |     type Pointer<T> = dyn Deref<Target = T>;
   |                       ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Deref<Target = T> + 'static)`
note: required by a bound in `PointerFamily::Pointer`
  --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:4:5
   |
LL |     type Pointer<T>: Deref<Target = T>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PointerFamily::Pointer`
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Pointer<T>: Deref<Target = T> + ?Sized;
   |                                        ++++++++

error[E0599]: the variant or associated item `new` exists for enum `Node<i32, RcFamily>`, but its trait bounds were not satisfied
  --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:31:35
   |
LL | enum Node<T, P: PointerFamily> {
   | ------------------------------ variant or associated item `new` not found for this enum
...
LL |     let mut list = RcNode::<i32>::new();
   |                                   ^^^ variant or associated item cannot be called on `Node<i32, RcFamily>` due to unsatisfied trait bounds
   |
note: trait bound `(dyn Deref<Target = Node<i32, RcFamily>> + 'static): Sized` was not satisfied
  --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:23:29
   |
LL | impl<T, P: PointerFamily> Node<T, P>
   |                           ----------
LL | where
LL |     P::Pointer<Node<T, P>>: Sized,
   |                             ^^^^^ unsatisfied trait bound introduced here

error: aborting due to 2 previous errors

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