rust/src/test/ui/issues/issue-10291.stderr

24 lines
808 B
Plaintext
Raw Normal View History

2018-07-15 14:11:54 -07:00
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
--> $DIR/issue-10291.rs:13:9
|
LL | x //~ ERROR E0312
| ^
|
note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 12:65...
--> $DIR/issue-10291.rs:12:65
|
LL | drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
| _________________________________________________________________^
LL | | x //~ ERROR E0312
LL | | }));
| |_____^
note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 11:9
--> $DIR/issue-10291.rs:11:9
|
LL | fn test<'x>(x: &'x isize) {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0312`.