Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- for line in io::stdin().lock().lines() {
- let line2 = line.unwrap();
- let line3 = line2.as_bytes();
- let value = json().parse(line3); // pub fn parse(&self, input: &'a [I]) -> Result<O>
- let value2 = value.unwrap();
- }
- }
- /*
- error[E0597]: `line2` does not live long enough
- --> src/main.rs:71:21
- |
- 71 | let line3 = line2.as_bytes();
- | ^^^^^-----------
- | |
- | borrowed value does not live long enough
- | argument requires that `line2` is borrowed for `'static`
- ...
- 74 | }
- | - `line2` dropped here while still borrowed
- error: aborting due to previous error
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement