Skip to content

Instantly share code, notes, and snippets.

@Swoorup
Created May 10, 2018 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swoorup/164e9f5161d7b742c1c16b0f4ff7dc60 to your computer and use it in GitHub Desktop.
Save Swoorup/164e9f5161d7b742c1c16b0f4ff7dc60 to your computer and use it in GitHub Desktop.
Error cargo build mysh-rs
Executing task: cargo build <
Compiling shell v0.1.0 (file:///home/swoorup/github/mysh-rs)
error[E0597]: `input` does not live long enough
--> src/main.rs:30:25
|
30 | lexer.tokenize(&input);
| ^^^^^ borrowed value does not live long enough
...
38 | }
| - `input` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `lexer` does not live long enough
--> src/main.rs:34:28
|
34 | match parser.parse(lexer.token_iter()) {
| ^^^^^ borrowed value does not live long enough
...
38 | }
| - `lexer` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.
error: Could not compile `shell`.
To learn more, run the command again with --verbose.
The terminal process terminated with exit code: 101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment