summary refs log tree commit diff
path: root/src/test/ui/regions/regions-ref-in-fn-arg.stderr
blob: 748508ecbcd39534c7d1146ee30b79eec12edc12 (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
error[E0597]: borrowed value does not live long enough
  --> $DIR/regions-ref-in-fn-arg.rs:4:17
   |
LL | fn arg_item(box ref x: Box<isize>) -> &'static isize {
   |                 ^^^^^ borrowed value does not live long enough
LL |     x //~^ ERROR borrowed value does not live long enough
LL | }
   | - borrowed value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0597]: borrowed value does not live long enough
  --> $DIR/regions-ref-in-fn-arg.rs:11:15
   |
LL |     with(|box ref x| x) //~ ERROR borrowed value does not live long enough
   |               ^^^^^  - borrowed value only lives until here
   |               |
   |               borrowed value does not live long enough
   |
   = note: borrowed value must be valid for the static lifetime...

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0597`.