rust/tests/ui/nested-ty-params.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
171 B
Rust
Raw Normal View History

// error-pattern:can't use generic parameters from outer function
fn hd<U>(v: Vec<U> ) -> U {
2012-08-02 00:30:05 +00:00
fn hd1(w: [U]) -> U { return w[0]; }
2012-08-02 00:30:05 +00:00
return hd1(v);
}
fn main() {}