fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
886 B25 linesraw
1error[E0401]: can't use generic parameters from outer function
2  --> $DIR/issue-3021-c.rs:4:24
3   |
4LL | fn siphash<T>() {
5   |            - type parameter from outer function
6...
7LL |         fn g(&self, x: T) -> T;
8   |            -           ^ use of generic parameter from outer function
9   |            |
10   |            help: try using a local generic parameter instead: `g<T>`
11
12error[E0401]: can't use generic parameters from outer function
13  --> $DIR/issue-3021-c.rs:4:30
14   |
15LL | fn siphash<T>() {
16   |            - type parameter from outer function
17...
18LL |         fn g(&self, x: T) -> T;
19   |            -                 ^ use of generic parameter from outer function
20   |            |
21   |            help: try using a local generic parameter instead: `g<T>`
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0401`.