|
1 |
| -error[E0401]: can't use type parameters from outer function; try using a local type parameter instead |
2 |
| - --> $DIR/E0401.rs:12:15 |
| 1 | +error[E0401]: can't use type parameters from outer function |
| 2 | + --> $DIR/E0401.rs:14:38 |
3 | 3 | |
|
4 |
| -LL | fn bar(y: T) { //~ ERROR E0401 |
5 |
| - | ^ use of type variable from outer function |
| 4 | +LL | fn foo<T>(x: T) { |
| 5 | + | - type variable from outer function |
| 6 | +LL | fn bar<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401 |
| 7 | + | -------------------------- ^ use of type variable from outer function |
| 8 | + | | |
| 9 | + | help: try using a local type parameter instead: `bar<U, V: Baz<U>, W: Fn(), T>` |
6 | 10 |
|
7 |
| -error: aborting due to previous error |
| 11 | +error[E0401]: can't use type parameters from outer function |
| 12 | + --> $DIR/E0401.rs:19:16 |
| 13 | + | |
| 14 | +LL | fn foo<T>(x: T) { |
| 15 | + | - type variable from outer function |
| 16 | +... |
| 17 | +LL | (y: T) { //~ ERROR E0401 |
| 18 | + | ^ use of type variable from outer function |
| 19 | + | |
| 20 | + = help: try using a local type parameter instead |
| 21 | + |
| 22 | +error[E0401]: can't use type parameters from outer function |
| 23 | + --> $DIR/E0401.rs:32:25 |
| 24 | + | |
| 25 | +LL | impl<T> Iterator for A<T> { |
| 26 | + | ---- `Self` type implicitely declared here, on the `impl` |
| 27 | +... |
| 28 | +LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401 |
| 29 | + | ------ ^^^^ use of type variable from outer function |
| 30 | + | | |
| 31 | + | help: try using a local type parameter instead: `helper<Self>` |
| 32 | + |
| 33 | +error: aborting due to 3 previous errors |
8 | 34 |
|
9 | 35 | If you want more information on this error, try using "rustc --explain E0401"
|
0 commit comments