]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-arg-out-of-scope.stderr
Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
[rust.git] / src / test / ui / type / type-arg-out-of-scope.stderr
1 error[E0401]: can't use generic parameters from outer function
2   --> $DIR/type-arg-out-of-scope.rs:3:29
3    |
4 LL | fn foo<T>(x: T) {
5    |        - type parameter from outer function
6 LL |     fn bar(f: Box<dyn FnMut(T) -> T>) { }
7    |           -                 ^ use of generic parameter from outer function
8    |           |
9    |           help: try using a local generic parameter instead: `<T>`
10
11 error[E0401]: can't use generic parameters from outer function
12   --> $DIR/type-arg-out-of-scope.rs:3:35
13    |
14 LL | fn foo<T>(x: T) {
15    |        - type parameter from outer function
16 LL |     fn bar(f: Box<dyn FnMut(T) -> T>) { }
17    |           -                       ^ use of generic parameter from outer function
18    |           |
19    |           help: try using a local generic parameter instead: `<T>`
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0401`.