rust/src/test/ui/nested-ty-params.rs

9 lines
168 B
Rust
Raw Normal View History

2018-02-07 09:26:35 -06:00
// error-pattern:can't use type parameters from outer function
fn hd<U>(v: Vec<U> ) -> U {
2012-08-01 19:30:05 -05:00
fn hd1(w: [U]) -> U { return w[0]; }
2012-08-01 19:30:05 -05:00
return hd1(v);
}
fn main() {}