| 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) { |
| | ----- try adding a local generic parameter in this method instead |
| LL | enum Foo<B> { |
| 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) { |
| | ----- try adding a local generic parameter in this method instead |
| LL | struct Foo<B>(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:23:28 |
| | |
| LL | trait TraitC<A> { |
| | - type parameter from outer function |
| LL | fn outer(&self) { |
| | ----- try adding a local generic parameter in this method instead |
| LL | struct Foo<B> { a: 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: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: `foo<B, A>` |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0401`. |