os-rust/src/test/ui/nested-ty-params.stderr

24 lines
885 B
Text
Raw Normal View History

error[E0401]: can't use generic parameters from outer function
2018-12-25 08:56:47 -07:00
--> $DIR/nested-ty-params.rs:3:16
2018-08-08 14:28:26 +02:00
|
LL | fn hd<U>(v: Vec<U> ) -> U {
| - type variable from outer function
LL | fn hd1(w: [U]) -> U { return w[0]; }
| --- ^ use of generic parameter from outer function
2018-08-08 14:28:26 +02:00
| |
| help: try using a local generic parameter instead: `hd1<U>`
2018-08-08 14:28:26 +02:00
error[E0401]: can't use generic parameters from outer function
2018-12-25 08:56:47 -07:00
--> $DIR/nested-ty-params.rs:3:23
2018-08-08 14:28:26 +02:00
|
LL | fn hd<U>(v: Vec<U> ) -> U {
| - type variable from outer function
LL | fn hd1(w: [U]) -> U { return w[0]; }
| --- ^ use of generic parameter from outer function
2018-08-08 14:28:26 +02:00
| |
| help: try using a local generic parameter instead: `hd1<U>`
2018-08-08 14:28:26 +02:00
error: aborting due to 2 previous errors
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0401`.