blob: eaf514da3376343a82cfdcc65746e9a22d576644 [file] [log] [blame]
//! Test that generic parameters from an outer function are not accessible
//! in nested functions.
fn foo<U>(v: Vec<U>) -> U {
fn bar(w: [U]) -> U {
//~^ ERROR can't use generic parameters from outer item
//~| ERROR can't use generic parameters from outer item
return w[0];
}
return bar(v);
}
fn main() {}