We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a17880 commit dbbdce5Copy full SHA for dbbdce5
src/test/ui/nll/user-annotations/issue-54124.rs
@@ -0,0 +1,9 @@
1
+#![feature(nll)]
2
+
3
+fn test<'a>() {
4
+ let _:fn(&()) = |_:&'a ()| {};
5
+}
6
7
+fn main() {
8
+ test();
9
src/test/ui/nll/user-annotations/issue-54124.stderr
@@ -0,0 +1,20 @@
+error: unsatisfied lifetime constraints
+ --> $DIR/issue-54124.rs:4:22
+ |
+LL | fn test<'a>() {
+ | -- lifetime `'a` defined here
+LL | let _:fn(&()) = |_:&'a ()| {};
+ | ^ - let's call the lifetime of this reference `'1`
+ | |
+ | requires that `'1` must outlive `'a`
10
11
12
13
14
15
16
17
+ | ^ requires that `'a` must outlive `'static`
18
19
+error: aborting due to 2 previous errors
20
0 commit comments