2020-06-27 12:54:56 -05:00
|
|
|
error[E0515]: cannot return value referencing local variable `s`
|
2020-07-04 06:15:04 -05:00
|
|
|
--> $DIR/issue-67765-async-diagnostic.rs:13:5
|
2020-06-27 12:54:56 -05:00
|
|
|
|
|
|
|
|
LL | let b = &s[..];
|
|
|
|
| - `s` is borrowed here
|
2022-06-08 13:07:59 -05:00
|
|
|
LL |
|
2020-06-27 12:54:56 -05:00
|
|
|
LL | Err(b)?;
|
2020-07-04 06:15:04 -05:00
|
|
|
| ^^^^^^^ returns a value referencing data owned by the current function
|
2020-06-27 12:54:56 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0515`.
|