blob: b9b8d00ce308b7463efac35c5c51a5725380f309 (
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:23: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:63: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:95: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`.
|