summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/feature-self-return-type.stderr
blob: 601e53b7694596631c84c67ada9e54e958519058 (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
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;
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 = ();
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 = ();
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`.