mirror of https://github.com/rust-lang/rust
24 lines
894 B
Plaintext
24 lines
894 B
Plaintext
error[E0401]: can't use generic parameters from outer item
|
|
--> $DIR/type-arg-out-of-scope.rs:3:29
|
|
|
|
|
LL | fn foo<T>(x: T) {
|
|
| - type parameter from outer item
|
|
LL | fn bar(f: Box<dyn FnMut(T) -> T>) { }
|
|
| - ^ use of generic parameter from outer item
|
|
| |
|
|
| help: try introducing a local generic parameter here: `<T>`
|
|
|
|
error[E0401]: can't use generic parameters from outer item
|
|
--> $DIR/type-arg-out-of-scope.rs:3:35
|
|
|
|
|
LL | fn foo<T>(x: T) {
|
|
| - type parameter from outer item
|
|
LL | fn bar(f: Box<dyn FnMut(T) -> T>) { }
|
|
| - ^ use of generic parameter from outer item
|
|
| |
|
|
| help: try introducing a local generic parameter here: `<T>`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0401`.
|