Test resolving of names with for
binders.
This commit is contained in:
parent
a298014245
commit
ecdb741df7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user