We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
for
1 parent a298014 commit ecdb741Copy full SHA for ecdb741
src/test/compile-fail/regions-name-undeclared.rs
@@ -44,6 +44,9 @@ fn bar<'a>(x: &'a int) {
44
// &'a CAN be declared on functions and used then:
45
fn g<'a>(a: &'a int) { } // OK
46
fn h(a: for<'a>|&'a int|) { } // OK
47
+
48
+ // But not in the bound of a closure, it's not in scope *there*
49
+ fn i(a: for<'a>|&int|:'a) { } //~ ERROR undeclared lifetime
50
}
51
52
// Test nesting of lifetimes in fn type declarations
0 commit comments