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
168 B
Rust
Raw Normal View History

2023-09-10 21:06:14 +00:00
//@ error-pattern:can't use generic parameters from outer item
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() {}