/
E0401.stderr
37 lines (33 loc) · 1.33 KB
/
E0401.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
error[E0401]: can't use generic parameters from outer function
--> $DIR/E0401.rs:4:39
|
LL | fn foo<T>(x: T) {
| - type variable from outer function
LL | fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401
| --------------------------- ^ use of generic parameter from outer function
| |
| help: try using a local generic parameter instead: `bfnr<U, V: Baz<U>, W: Fn(), T>`
error[E0401]: can't use generic parameters from outer function
--> $DIR/E0401.rs:9:16
|
LL | fn foo<T>(x: T) {
| - type variable from outer function
...
LL | fn baz<U,
| --- try adding a local generic parameter in this method instead
...
LL | (y: T) { //~ ERROR E0401
| ^ use of generic parameter from outer function
error[E0401]: can't use generic parameters from outer function
--> $DIR/E0401.rs:22:25
|
LL | impl<T> Iterator for A<T> {
| ---- `Self` type implicitly declared here, by this `impl`
...
LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401
| ^^^^
| |
| use of generic parameter from outer function
| use a type here instead
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0401`.