11 lines
510 B
Plaintext
11 lines
510 B
Plaintext
error[E0597]: `local_data` does not live long enough
|
|
--> tests/ui/invalid_closure.rs:7:27
|
|
|
|
|
7 | let ref_: &[u8] = &local_data;
|
|
| ^^^^^^^^^^^ borrowed value does not live long enough
|
|
...
|
|
13 | PyCFunction::new_closure(py, None, None, closure_fn).unwrap().into()
|
|
| ---------------------------------------------------- argument requires that `local_data` is borrowed for `'static`
|
|
14 | });
|
|
| - `local_data` dropped here while still borrowed
|