]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/resolve-type-param-in-item-in-trait.stderr
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / ui / resolve / resolve-type-param-in-item-in-trait.stderr
1 error[E0401]: can't use generic parameters from outer function
2   --> $DIR/resolve-type-param-in-item-in-trait.rs:8:22
3    |
4 LL | trait TraitA<A> {
5    |              - type parameter from outer function
6 LL |     fn outer(&self) {
7 LL |         enum Foo<B> {
8    |                  - help: try using a local generic parameter instead: `A,`
9 LL |             Variance(A)
10    |                      ^ use of generic parameter from outer function
11
12 error[E0401]: can't use generic parameters from outer function
13   --> $DIR/resolve-type-param-in-item-in-trait.rs:16:23
14    |
15 LL | trait TraitB<A> {
16    |              - type parameter from outer function
17 LL |     fn outer(&self) {
18 LL |         struct Foo<B>(A);
19    |                    -  ^ use of generic parameter from outer function
20    |                    |
21    |                    help: try using a local generic parameter instead: `A,`
22
23 error[E0401]: can't use generic parameters from outer function
24   --> $DIR/resolve-type-param-in-item-in-trait.rs:23:28
25    |
26 LL | trait TraitC<A> {
27    |              - type parameter from outer function
28 LL |     fn outer(&self) {
29 LL |         struct Foo<B> { a: A }
30    |                    -       ^ use of generic parameter from outer function
31    |                    |
32    |                    help: try using a local generic parameter instead: `A,`
33
34 error[E0401]: can't use generic parameters from outer function
35   --> $DIR/resolve-type-param-in-item-in-trait.rs:30:22
36    |
37 LL | trait TraitD<A> {
38    |              - type parameter from outer function
39 LL |     fn outer(&self) {
40 LL |         fn foo<B>(a: A) { }
41    |                -     ^ use of generic parameter from outer function
42    |                |
43    |                help: try using a local generic parameter instead: `A,`
44
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0401`.