error[E0401]: can't use type parameters from outer function --> $DIR/E0401.rs:14:39 | LL | fn foo(x: T) { | - type variable from outer function LL | fn bfnr, W: Fn()>(y: T) { //~ ERROR E0401 | --------------------------- ^ use of type variable from outer function | | | help: try using a local type parameter instead: `bfnr, W: Fn(), T>` error[E0401]: can't use type parameters from outer function --> $DIR/E0401.rs:19:16 | LL | fn foo(x: T) { | - type variable from outer function ... LL | fn baz $DIR/E0401.rs:32:25 | LL | impl Iterator for A { | ---- `Self` type implicitly declared here, by this `impl` ... LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401 | ^^^^ | | | use of type variable from outer function | use a type here instead error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0401`.