1 error[E0401]: can't use type parameters from outer function
2 --> $DIR/issue-5997-enum.rs:12:16
4 LL | fn f<Z>() -> bool {
5 | - - type variable from outer function
7 | try adding a local type parameter in this method instead
9 | ^ use of type variable from outer function
11 error: aborting due to previous error
13 For more information about this error, try `rustc --explain E0401`.