blob: 0a6d1cc3bcd45fe00be2b9c68b62329bb6678eb1 (
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
|
error[E0401]: can't use generic parameters from outer function
--> $DIR/resolve-type-param-in-item-in-trait.rs:8:22
|
LL | trait TraitA<A> {
| - type parameter from outer function
LL | fn outer(&self) {
LL | enum Foo<B> {
| - help: try using a local generic parameter instead: `A,`
LL | Variance(A)
| ^ use of generic parameter from outer function
error[E0401]: can't use generic parameters from outer function
--> $DIR/resolve-type-param-in-item-in-trait.rs:16:23
|
LL | trait TraitB<A> {
| - type parameter from outer function
LL | fn outer(&self) {
LL | struct Foo<B>(A);
| - ^ use of generic parameter from outer function
| |
| help: try using a local generic parameter instead: `A,`
error[E0401]: can't use generic parameters from outer function
--> $DIR/resolve-type-param-in-item-in-trait.rs:23:28
|
LL | trait TraitC<A> {
| - type parameter from outer function
LL | fn outer(&self) {
LL | struct Foo<B> { a: A }
| - ^ use of generic parameter from outer function
| |
| help: try using a local generic parameter instead: `A,`
error[E0401]: can't use generic parameters from outer function
--> $DIR/resolve-type-param-in-item-in-trait.rs:30:22
|
LL | trait TraitD<A> {
| - type parameter from outer function
LL | fn outer(&self) {
LL | fn foo<B>(a: A) { }
| - ^ use of generic parameter from outer function
| |
| help: try using a local generic parameter instead: `A,`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0401`.
|