You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0521]: borrowed data escapes outside of function
--> src\lexer.rs:121:22
|
120 | fn anyhow_with_nom(input: &str) -> anyhow::Result<&str> {
| ----- - let's call the lifetime of this reference `'1`
| |
| `input` is a reference that is only valid in the function body
121 | let (input, _) = ftag(input)?;
| ^^^^^^^^^^^
| |
| `input` escapes the function body here
| argument requires that `'1` must outlive `'static`
It will be fine if I turn anyohw::Result into nom::IResult
Sorry about my poor English, tell me anything you don't understand
I try to use anyhow when I'm writing a with nom , then I set the return type as anyhow::Result
here is a simple example
The error message :
It will be fine if I turn anyohw::Result into nom::IResult
The text was updated successfully, but these errors were encountered: