forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissue-10291.stderr
More file actions
23 lines (21 loc) · 779 Bytes
/
Copy pathissue-10291.stderr
File metadata and controls
23 lines (21 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
--> $DIR/issue-10291.rs:3:9
|
LL | x
| ^
|
note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 2:69...
--> $DIR/issue-10291.rs:2:69
|
LL | drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
| _____________________________________________________________________^
LL | | x
LL | | }));
| |_____^
note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 1:9
--> $DIR/issue-10291.rs:1:9
|
LL | fn test<'x>(x: &'x isize) {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0312`.