Test resolving of names with for binders.

This commit is contained in:
Niko Matsakis 2014-11-15 17:26:51 -05:00
parent a298014245
commit ecdb741df7

View File

@ -44,6 +44,9 @@ fn bar<'a>(x: &'a int) {
// &'a CAN be declared on functions and used then:
fn g<'a>(a: &'a int) { } // OK
fn h(a: for<'a>|&'a int|) { } // OK
// But not in the bound of a closure, it's not in scope *there*
fn i(a: for<'a>|&int|:'a) { } //~ ERROR undeclared lifetime
}
// Test nesting of lifetimes in fn type declarations