blob: e7113a9dfb1b9bc2e4efa96b625a1041c29fe0de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
error[E0597]: `bar` does not live long enough
--> $DIR/feature-self-return-type.rs:22:22
|
LL | let x = {
| - borrow later stored here
LL | let bar = 22;
| --- binding `bar` declared here
LL | Foo::new(&bar).into()
| ^^^^ borrowed value does not live long enough
LL |
LL | };
| - `bar` dropped here while still borrowed
error[E0597]: `y` does not live long enough
--> $DIR/feature-self-return-type.rs:62:17
|
LL | let x = {
| - borrow later stored here
LL | let y = ();
| - binding `y` declared here
LL | foo(&y)
| ^^ borrowed value does not live long enough
LL |
LL | };
| - `y` dropped here while still borrowed
error[E0597]: `y` does not live long enough
--> $DIR/feature-self-return-type.rs:94:17
|
LL | let x = {
| - borrow later stored here
LL | let y = ();
| - binding `y` declared here
LL | foo(&y)
| ^^ borrowed value does not live long enough
LL |
LL | };
| - `y` dropped here while still borrowed
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0597`.
|