]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type/type-arg-out-of-scope.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / type / type-arg-out-of-scope.stderr
CommitLineData
9fa01778 1error[E0401]: can't use generic parameters from outer function
dc9dc135 2 --> $DIR/type-arg-out-of-scope.rs:3:29
b7449926
XL
3 |
4LL | fn foo<T>(x: T) {
48663c56 5 | - type parameter from outer function
dc9dc135 6LL | fn bar(f: Box<dyn FnMut(T) -> T>) { }
f2b60f7d
FG
7 | - ^ use of generic parameter from outer function
8 | |
9 | help: try using a local generic parameter instead: `<T>`
b7449926 10
9fa01778 11error[E0401]: can't use generic parameters from outer function
dc9dc135 12 --> $DIR/type-arg-out-of-scope.rs:3:35
b7449926
XL
13 |
14LL | fn foo<T>(x: T) {
48663c56 15 | - type parameter from outer function
dc9dc135 16LL | fn bar(f: Box<dyn FnMut(T) -> T>) { }
f2b60f7d
FG
17 | - ^ use of generic parameter from outer function
18 | |
19 | help: try using a local generic parameter instead: `<T>`
b7449926
XL
20
21error: aborting due to 2 previous errors
22
23For more information about this error, try `rustc --explain E0401`.