File: assoc-const-eq-param-in-ty.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, 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 (108 lines) | stat: -rw-r--r-- 4,804 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
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
107
108
error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:9:61
   |
LL | fn take0<'r, A: 'r, const Q: usize>(_: impl Trait<'r, A, Q, K = { loop {} }>) {}
   |          -- the lifetime parameter `'r` is defined here     ^ its type must not depend on the lifetime parameter `'r`
   |
   = note: `K` has type `&'r [A; Q]`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:9:61
   |
LL | fn take0<'r, A: 'r, const Q: usize>(_: impl Trait<'r, A, Q, K = { loop {} }>) {}
   |              - the type parameter `A` is defined here       ^ its type must not depend on the type parameter `A`
   |
   = note: `K` has type `&'r [A; Q]`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:9:61
   |
LL | fn take0<'r, A: 'r, const Q: usize>(_: impl Trait<'r, A, Q, K = { loop {} }>) {}
   |                           -                                 ^ its type must not depend on the const parameter `Q`
   |                           |
   |                           the const parameter `Q` is defined here
   |
   = note: `K` has type `&'r [A; Q]`

error: the type of the associated constant `SELF` must not depend on `impl Trait`
  --> $DIR/assoc-const-eq-param-in-ty.rs:27:26
   |
LL | fn take1(_: impl Project<SELF = {}>) {}
   |             -------------^^^^------
   |             |            |
   |             |            its type must not depend on `impl Trait`
   |             the `impl Trait` is specified here

error: the type of the associated constant `SELF` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:32:21
   |
LL | fn take2<P: Project<SELF = {}>>(_: P) {}
   |          -          ^^^^ its type must not depend on the type parameter `P`
   |          |
   |          the type parameter `P` is defined here
   |
   = note: `SELF` has type `P`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL | trait Iface<'r> {
   |             -- the lifetime parameter `'r` is defined here
...
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                                                    ^ its type must not depend on the lifetime parameter `'r`
   |
   = note: `K` has type `&'r [Self; Q]`

error: the type of the associated constant `K` must not depend on `Self`
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                                                    ^ its type must not depend on `Self`
   |
   = note: `K` has type `&'r [Self; Q]`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                      -                             ^ its type must not depend on the const parameter `Q`
   |                      |
   |                      the const parameter `Q` is defined here
   |
   = note: `K` has type `&'r [Self; Q]`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL | trait Iface<'r> {
   |             -- the lifetime parameter `'r` is defined here
...
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                                                    ^ its type must not depend on the lifetime parameter `'r`
   |
   = note: `K` has type `&'r [Self; Q]`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: the type of the associated constant `K` must not depend on `Self`
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                                                    ^ its type must not depend on `Self`
   |
   = note: `K` has type `&'r [Self; Q]`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: the type of the associated constant `K` must not depend on generic parameters
  --> $DIR/assoc-const-eq-param-in-ty.rs:41:52
   |
LL |     type Assoc<const Q: usize>: Trait<'r, Self, Q, K = { loop {} }>
   |                      -                             ^ its type must not depend on the const parameter `Q`
   |                      |
   |                      the const parameter `Q` is defined here
   |
   = note: `K` has type `&'r [Self; Q]`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 11 previous errors