summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/issue-69314.stderr
blob: 3879f35505c2e5b2da08314fc78a6ff23e361b14 (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
error[E0726]: implicit elided lifetime not allowed here
  --> $DIR/issue-69314.rs:18:20
   |
LL |     async fn f2(m: Msg) {}
   |                    ^^^ expected lifetime parameter
   |
help: indicate the anonymous lifetime
   |
LL |     async fn f2(m: Msg<'_>) {}
   |                       ++++

error[E0597]: `buf` does not live long enough
  --> $DIR/issue-69314.rs:14:19
   |
LL |         let mut buf = [0; 512];
   |             ------- binding `buf` declared here
LL |         let m2 = &buf[..];
   |                   ^^^ borrowed value does not live long enough
LL |         let m = Self::g(m2).await;
   |                 ----------- argument requires that `buf` is borrowed for `'static`
LL |         Self::f2(m).await;
LL |     }
   |     - `buf` dropped here while still borrowed

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0597, E0726.
For more information about an error, try `rustc --explain E0597`.