[INFO] cloning repository https://github.com/CozmicL/shift-reduce-json
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CozmicL/shift-reduce-json" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCozmicL%2Fshift-reduce-json", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCozmicL%2Fshift-reduce-json'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 63a8e82ac422c9c76410938b74ebdd38973c3b02
[INFO] checking CozmicL/shift-reduce-json against try#438eb4c1a1c3841523d7f672601e8adbe04cff28 for pr-147589-1
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCozmicL%2Fshift-reduce-json" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/CozmicL/shift-reduce-json
[INFO] finished tweaking git repo https://github.com/CozmicL/shift-reduce-json
[INFO] tweaked toml for git repo https://github.com/CozmicL/shift-reduce-json written to /workspace/builds/worker-7-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/CozmicL/shift-reduce-json on toolchain 438eb4c1a1c3841523d7f672601e8adbe04cff28
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/CozmicL/shift-reduce-json already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 200bae242ea78abb7439b1df1861e9d58f6753e7e381c1db544668b9070c2239
[INFO] running `Command { std: "docker" "start" "-a" "200bae242ea78abb7439b1df1861e9d58f6753e7e381c1db544668b9070c2239", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "200bae242ea78abb7439b1df1861e9d58f6753e7e381c1db544668b9070c2239", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "200bae242ea78abb7439b1df1861e9d58f6753e7e381c1db544668b9070c2239", kill_on_drop: false }`
[INFO] [stdout] 200bae242ea78abb7439b1df1861e9d58f6753e7e381c1db544668b9070c2239
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 33761b798bf6536409abe9cd9d23b76f68dea5f258a592b1a6cc4cf0ccf2a012
[INFO] running `Command { std: "docker" "start" "-a" "33761b798bf6536409abe9cd9d23b76f68dea5f258a592b1a6cc4cf0ccf2a012", kill_on_drop: false }`
[INFO] [stderr]     Checking shift-reduce-json v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unused import: `JsonValueType`
[INFO] [stdout]  --> src/grammar.rs:2:50
[INFO] [stdout]   |
[INFO] [stdout] 2 | use crate::{lexer::Token, unmarshal::{JsonValue, JsonValueType}};
[INFO] [stdout]   |                                                  ^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused import: `JsonValueType`
[INFO] [stdout]  --> src/grammar.rs:2:50
[INFO] [stdout]   |
[INFO] [stdout] 2 | use crate::{lexer::Token, unmarshal::{JsonValue, JsonValueType}};
[INFO] [stdout]   |                                                  ^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:68:47
[INFO] [stdout]    |
[INFO] [stdout] 68 | fn value_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:72:49
[INFO] [stdout]    |
[INFO] [stdout] 72 | fn boolean_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:76:48
[INFO] [stdout]    |
[INFO] [stdout] 76 | fn object_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:81:49
[INFO] [stdout]    |
[INFO] [stdout] 81 | fn members_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:85:48
[INFO] [stdout]    |
[INFO] [stdout] 85 | fn member_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:89:47
[INFO] [stdout]    |
[INFO] [stdout] 89 | fn array_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:92:50
[INFO] [stdout]    |
[INFO] [stdout] 92 | fn elements_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:96:49
[INFO] [stdout]    |
[INFO] [stdout] 96 | fn element_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:100:48
[INFO] [stdout]     |
[INFO] [stdout] 100 | fn number_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:104:49
[INFO] [stdout]     |
[INFO] [stdout] 104 | fn integer_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:108:50
[INFO] [stdout]     |
[INFO] [stdout] 108 | fn fraction_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:112:50
[INFO] [stdout]     |
[INFO] [stdout] 112 | fn exponent_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:68:47
[INFO] [stdout]    |
[INFO] [stdout] 68 | fn value_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:72:49
[INFO] [stdout]    |
[INFO] [stdout] 72 | fn boolean_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:76:48
[INFO] [stdout]    |
[INFO] [stdout] 76 | fn object_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:81:49
[INFO] [stdout]    |
[INFO] [stdout] 81 | fn members_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:85:48
[INFO] [stdout]    |
[INFO] [stdout] 85 | fn member_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:89:47
[INFO] [stdout]    |
[INFO] [stdout] 89 | fn array_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:92:50
[INFO] [stdout]    |
[INFO] [stdout] 92 | fn elements_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/grammar.rs:96:49
[INFO] [stdout]    |
[INFO] [stdout] 96 | fn element_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]    |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]    |    |
[INFO] [stdout]    |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:100:48
[INFO] [stdout]     |
[INFO] [stdout] 100 | fn number_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -----------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:104:49
[INFO] [stdout]     |
[INFO] [stdout] 104 | fn integer_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    ------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:108:50
[INFO] [stdout]     |
[INFO] [stdout] 108 | fn fraction_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/grammar.rs:112:50
[INFO] [stdout]     |
[INFO] [stdout] 112 | fn exponent_rule<'a>(values: &[StackElement]) -> JsonValue<'a> {
[INFO] [stdout]     |    -------------                                 ^^^^^^^^^^^^^ expected `JsonValue<'_>`, found `()`
[INFO] [stdout]     |    |
[INFO] [stdout]     |    implicitly returns `()` as its body has no tail or `return` expression
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/grammar.rs:54:9
[INFO] [stdout]    |
[INFO] [stdout] 52 | impl<'a> JsonElement<'a> {
[INFO] [stdout]    |      -- lifetime `'a` defined here
[INFO] [stdout] 53 |     pub fn as_any(&self) -> &dyn Any {
[INFO] [stdout] 54 |         self
[INFO] [stdout]    |         ^^^^ coercion requires that `'a` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0597]: `tokens` does not live long enough
[INFO] [stdout]   --> src/parse.rs:25:26
[INFO] [stdout]    |
[INFO] [stdout] 16 |     let tokens = match lex(input) {
[INFO] [stdout]    |         ------ binding `tokens` declared here
[INFO] [stdout] ...
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout]    |                          ^^^^^^ borrowed value does not live long enough
[INFO] [stdout] ...
[INFO] [stdout] 76 |     Ok(JsonValue::new(val, "nil"))
[INFO] [stdout]    |        -------------------------- argument requires that `tokens` is borrowed for `'static`
[INFO] [stdout] 77 | }
[INFO] [stdout]    | - `tokens` dropped here while still borrowed
[INFO] [stdout]    |
[INFO] [stdout] note: requirement that the value outlives `'static` introduced here
[INFO] [stdout]   --> src/unmarshal.rs:19:19
[INFO] [stdout]    |
[INFO] [stdout] 19 |     pub fn new<T: 'static>(value: T, value_type: JsonValueType<'a>) -> Self {
[INFO] [stdout]    |                   ^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: use of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ----------------------------
[INFO] [stdout]    |     |
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ^^^^^ value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here, in previous iteration of loop
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `*lookahead` which is behind a shared reference
[INFO] [stdout]   --> src/parse.rs:26:53
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                                     ^^^^^^^^^^ move occurs because `*lookahead` has type `Token<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `Token<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/lexer.rs:14:1
[INFO] [stdout]    |
[INFO] [stdout] 14 | pub struct Token<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:53
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                                     ---------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:30:13
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ---------------------------- inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 30 |             stack.push(StackElement{
[INFO] [stdout]    |             ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:45:13
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ---------------------------- inside of this loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 45 |             stack.truncate(stack.len() - offset as usize);
[INFO] [stdout]    |             ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: use of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ----------------------------
[INFO] [stdout]    |     |
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 56 |     loop {
[INFO] [stdout]    |     ---- inside of this loop
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ^^^^^ value moved here, in previous iteration of loop
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 56 ~     let mut value = action(stack);
[INFO] [stdout] 57 ~     loop {
[INFO] [stdout] 58 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:70:8
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 56 |     loop {
[INFO] [stdout]    |     ---- inside of this loop
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 70 |     if stack.len() != 1 {
[INFO] [stdout]    |        ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 56 ~     let mut value = action(stack);
[INFO] [stdout] 57 ~     loop {
[INFO] [stdout] 58 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0521]: borrowed data escapes outside of function
[INFO] [stdout]   --> src/parse.rs:76:8
[INFO] [stdout]    |
[INFO] [stdout] 15 | fn parse(input: &str) -> Result<JsonValue, ParseError> {
[INFO] [stdout]    |          -----  - let's call the lifetime of this reference `'1`
[INFO] [stdout]    |          |
[INFO] [stdout]    |          `input` is a reference that is only valid in the function body
[INFO] [stdout] ...
[INFO] [stdout] 76 |     Ok(JsonValue::new(val, "nil"))
[INFO] [stdout]    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |        |
[INFO] [stdout]    |        `input` escapes the function body here
[INFO] [stdout]    |        argument requires that `'1` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: value assigned to `i` is never read
[INFO] [stdout]   --> src/parse.rs:35:17
[INFO] [stdout]    |
[INFO] [stdout] 35 |                 i = next_index;
[INFO] [stdout]    |                 ^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = help: maybe it is overwritten before being read?
[INFO] [stdout]    = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/util.rs:26:54
[INFO] [stdout]    |
[INFO] [stdout] 20 | fn get_values<'a>(stack: Vec<StackElement<'a>>) -> Result<Vec<JsonElement<'a>>, ValueError> {
[INFO] [stdout]    |               -- lifetime `'a` defined here
[INFO] [stdout] ...
[INFO] [stdout] 26 |         if let Some(values) = rule.as_ref().as_any().downcast_ref::<Vec<JsonElement<'a>>>() {
[INFO] [stdout]    |                                                      ^^^^^^^^^^^^ requires that `'a` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of a shared reference
[INFO] [stdout]   --> src/util.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 return Ok(*values.clone());
[INFO] [stdout]    |                           ^^^^^^^^^^^^^^^ move occurs because value has type `Vec<JsonElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `JsonElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:41:1
[INFO] [stdout]    |
[INFO] [stdout] 41 | pub struct JsonElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/util.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 return Ok(*values.clone());
[INFO] [stdout]    |                           --------------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of a shared reference
[INFO] [stdout]   --> src/util.rs:44:33
[INFO] [stdout]    |
[INFO] [stdout] 44 |         Some(first_value) => Ok(*first_value.clone()),
[INFO] [stdout]    |                                 ^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `JsonElement<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `JsonElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:41:1
[INFO] [stdout]    |
[INFO] [stdout] 41 | pub struct JsonElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/util.rs:44:33
[INFO] [stdout]    |
[INFO] [stdout] 44 |         Some(first_value) => Ok(*first_value.clone()),
[INFO] [stdout]    |                                 -------------------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0381]: used binding `elems` isn't initialized
[INFO] [stdout]   --> src/util.rs:76:9
[INFO] [stdout]    |
[INFO] [stdout] 67 |     let mut elems: Vec<ElementType>;
[INFO] [stdout]    |         --------- binding declared here but left uninitialized
[INFO] [stdout] ...
[INFO] [stdout] 76 |         elems.extend_from_slice(&stack_to_token(slice));
[INFO] [stdout]    |         ^^^^^ `elems` used here but it isn't initialized
[INFO] [stdout]    |
[INFO] [stdout] help: consider assigning a value
[INFO] [stdout]    |
[INFO] [stdout] 67 |     let mut elems: Vec<ElementType> = vec![];
[INFO] [stdout]    |                                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/action.rs:20:28
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |               ----- has type `Vec<StackElement<'1>>`
[INFO] [stdout] ...
[INFO] [stdout] 20 |                     value: Box::new((rule.to_json)(&stack[stack.len() - size..])),
[INFO] [stdout]    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ coercion requires that `'1` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `el.rule` as enum variant `Some` which is behind a shared reference
[INFO] [stdout]   --> src/action.rs:39:36
[INFO] [stdout]    |
[INFO] [stdout] 39 |         } else if let Some(rule) = el.rule {
[INFO] [stdout]    |                            ----    ^^^^^^^
[INFO] [stdout]    |                            |
[INFO] [stdout]    |                            data moved here
[INFO] [stdout]    |                            move occurs because `rule` has type `JsonElement<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] help: consider borrowing here
[INFO] [stdout]    |
[INFO] [stdout] 39 |         } else if let Some(rule) = &el.rule {
[INFO] [stdout]    |                                    +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0381]: used binding `elements` isn't initialized
[INFO] [stdout]   --> src/action.rs:44:5
[INFO] [stdout]    |
[INFO] [stdout] 34 |     let mut elements: Vec<ElementType<'a>>;
[INFO] [stdout]    |         ------------ binding declared here but left uninitialized
[INFO] [stdout] ...
[INFO] [stdout] 44 |     elements
[INFO] [stdout]    |     ^^^^^^^^ `elements` used here but it isn't initialized
[INFO] [stdout]    |
[INFO] [stdout] help: consider assigning a value
[INFO] [stdout]    |
[INFO] [stdout] 34 |     let mut elements: Vec<ElementType<'a>> = vec![];
[INFO] [stdout]    |                                            ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0308, E0381, E0382, E0507, E0521, E0597.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0308`.
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/grammar.rs:54:9
[INFO] [stdout]    |
[INFO] [stdout] 52 | impl<'a> JsonElement<'a> {
[INFO] [stdout]    |      -- lifetime `'a` defined here
[INFO] [stdout] 53 |     pub fn as_any(&self) -> &dyn Any {
[INFO] [stdout] 54 |         self
[INFO] [stdout]    |         ^^^^ coercion requires that `'a` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0597]: `tokens` does not live long enough
[INFO] [stdout]   --> src/parse.rs:25:26
[INFO] [stdout]    |
[INFO] [stdout] 16 |     let tokens = match lex(input) {
[INFO] [stdout]    |         ------ binding `tokens` declared here
[INFO] [stdout] ...
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout]    |                          ^^^^^^ borrowed value does not live long enough
[INFO] [stdout] ...
[INFO] [stdout] 76 |     Ok(JsonValue::new(val, "nil"))
[INFO] [stdout]    |        -------------------------- argument requires that `tokens` is borrowed for `'static`
[INFO] [stdout] 77 | }
[INFO] [stdout]    | - `tokens` dropped here while still borrowed
[INFO] [stdout]    |
[INFO] [stdout] note: requirement that the value outlives `'static` introduced here
[INFO] [stdout]   --> src/unmarshal.rs:19:19
[INFO] [stdout]    |
[INFO] [stdout] 19 |     pub fn new<T: 'static>(value: T, value_type: JsonValueType<'a>) -> Self {
[INFO] [stdout]    |                   ^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: use of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ----------------------------
[INFO] [stdout]    |     |
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ^^^^^ value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here, in previous iteration of loop
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `*lookahead` which is behind a shared reference
[INFO] [stdout]   --> src/parse.rs:26:53
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                                     ^^^^^^^^^^ move occurs because `*lookahead` has type `Token<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `Token<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/lexer.rs:14:1
[INFO] [stdout]    |
[INFO] [stdout] 14 | pub struct Token<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:53
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                                     ---------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:30:13
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ---------------------------- inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 30 |             stack.push(StackElement{
[INFO] [stdout]    |             ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `shift-reduce-json` (bin "shift-reduce-json" test) due to 28 previous errors; 2 warnings emitted
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:45:13
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ---------------------------- inside of this loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 45 |             stack.truncate(stack.len() - offset as usize);
[INFO] [stdout]    |             ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0382]: use of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 24 |     for mut i in 0..tokens.len() {
[INFO] [stdout]    |     ----------------------------
[INFO] [stdout]    |     |
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout]    |     inside of this loop
[INFO] [stdout] 25 |         let lookahead = &tokens[i];
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout] 56 |     loop {
[INFO] [stdout]    |     ---- inside of this loop
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ^^^^^ value moved here, in previous iteration of loop
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:42:45
[INFO] [stdout]    |
[INFO] [stdout] 42 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `check_prefix_exists` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/util.rs:66:39
[INFO] [stdout]    |
[INFO] [stdout] 66 | pub fn check_prefix_exists<'a>(stack: Vec<StackElement<'a>>,lookahead:Token) -> PrefixMatch{
[INFO] [stdout]    |        -------------------            ^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:26:46
[INFO] [stdout]    |
[INFO] [stdout] 26 |         let match_type = check_prefix_exists(stack, *lookahead);
[INFO] [stdout]    |                                              ----- you could clone this value
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = action(stack);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] ...
[INFO] [stdout] 42 |
[INFO] [stdout] 43 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 24 ~     let mut value = check_prefix_exists(stack, *lookahead);
[INFO] [stdout] 25 ~     for mut i in 0..tokens.len() {
[INFO] [stdout] 26 |         let lookahead = &tokens[i];
[INFO] [stdout] 27 ~         let match_type = value;
[INFO] [stdout]    |
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 56 ~     let mut value = action(stack);
[INFO] [stdout] 57 ~     loop {
[INFO] [stdout] 58 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `shift-reduce-json` (bin "shift-reduce-json") due to 28 previous errors; 2 warnings emitted
[INFO] [stdout] error[E0382]: borrow of moved value: `stack`
[INFO] [stdout]   --> src/parse.rs:70:8
[INFO] [stdout]    |
[INFO] [stdout] 21 |     let mut stack: Vec<StackElement> = Vec::new();
[INFO] [stdout]    |         --------- move occurs because `stack` has type `Vec<StackElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 56 |     loop {
[INFO] [stdout]    |     ---- inside of this loop
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 70 |     if stack.len() != 1 {
[INFO] [stdout]    |        ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `action` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/action.rs:3:22
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |        ------        ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
[INFO] [stdout]    |        |
[INFO] [stdout]    |        in this function
[INFO] [stdout] note: if `StackElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:61:1
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct StackElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/parse.rs:57:45
[INFO] [stdout]    |
[INFO] [stdout] 57 |         let (json_element, offset) = action(stack); 
[INFO] [stdout]    |                                             ----- you could clone this value
[INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once
[INFO] [stdout]    |
[INFO] [stdout] 56 ~     let mut value = action(stack);
[INFO] [stdout] 57 ~     loop {
[INFO] [stdout] 58 ~         let (json_element, offset) = value; 
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0521]: borrowed data escapes outside of function
[INFO] [stdout]   --> src/parse.rs:76:8
[INFO] [stdout]    |
[INFO] [stdout] 15 | fn parse(input: &str) -> Result<JsonValue, ParseError> {
[INFO] [stdout]    |          -----  - let's call the lifetime of this reference `'1`
[INFO] [stdout]    |          |
[INFO] [stdout]    |          `input` is a reference that is only valid in the function body
[INFO] [stdout] ...
[INFO] [stdout] 76 |     Ok(JsonValue::new(val, "nil"))
[INFO] [stdout]    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |        |
[INFO] [stdout]    |        `input` escapes the function body here
[INFO] [stdout]    |        argument requires that `'1` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: value assigned to `i` is never read
[INFO] [stdout]   --> src/parse.rs:35:17
[INFO] [stdout]    |
[INFO] [stdout] 35 |                 i = next_index;
[INFO] [stdout]    |                 ^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = help: maybe it is overwritten before being read?
[INFO] [stdout]    = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/util.rs:26:54
[INFO] [stdout]    |
[INFO] [stdout] 20 | fn get_values<'a>(stack: Vec<StackElement<'a>>) -> Result<Vec<JsonElement<'a>>, ValueError> {
[INFO] [stdout]    |               -- lifetime `'a` defined here
[INFO] [stdout] ...
[INFO] [stdout] 26 |         if let Some(values) = rule.as_ref().as_any().downcast_ref::<Vec<JsonElement<'a>>>() {
[INFO] [stdout]    |                                                      ^^^^^^^^^^^^ requires that `'a` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of a shared reference
[INFO] [stdout]   --> src/util.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 return Ok(*values.clone());
[INFO] [stdout]    |                           ^^^^^^^^^^^^^^^ move occurs because value has type `Vec<JsonElement<'_>>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `JsonElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:41:1
[INFO] [stdout]    |
[INFO] [stdout] 41 | pub struct JsonElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/util.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 return Ok(*values.clone());
[INFO] [stdout]    |                           --------------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of a shared reference
[INFO] [stdout]   --> src/util.rs:44:33
[INFO] [stdout]    |
[INFO] [stdout] 44 |         Some(first_value) => Ok(*first_value.clone()),
[INFO] [stdout]    |                                 ^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `JsonElement<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] note: if `JsonElement<'_>` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/grammar.rs:41:1
[INFO] [stdout]    |
[INFO] [stdout] 41 | pub struct JsonElement<'a> {
[INFO] [stdout]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/util.rs:44:33
[INFO] [stdout]    |
[INFO] [stdout] 44 |         Some(first_value) => Ok(*first_value.clone()),
[INFO] [stdout]    |                                 -------------------- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0381]: used binding `elems` isn't initialized
[INFO] [stdout]   --> src/util.rs:76:9
[INFO] [stdout]    |
[INFO] [stdout] 67 |     let mut elems: Vec<ElementType>;
[INFO] [stdout]    |         --------- binding declared here but left uninitialized
[INFO] [stdout] ...
[INFO] [stdout] 76 |         elems.extend_from_slice(&stack_to_token(slice));
[INFO] [stdout]    |         ^^^^^ `elems` used here but it isn't initialized
[INFO] [stdout]    |
[INFO] [stdout] help: consider assigning a value
[INFO] [stdout]    |
[INFO] [stdout] 67 |     let mut elems: Vec<ElementType> = vec![];
[INFO] [stdout]    |                                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: lifetime may not live long enough
[INFO] [stdout]   --> src/action.rs:20:28
[INFO] [stdout]    |
[INFO] [stdout]  3 | pub fn action(stack: Vec<StackElement>) -> (JsonElement, i32) {
[INFO] [stdout]    |               ----- has type `Vec<StackElement<'1>>`
[INFO] [stdout] ...
[INFO] [stdout] 20 |                     value: Box::new((rule.to_json)(&stack[stack.len() - size..])),
[INFO] [stdout]    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ coercion requires that `'1` must outlive `'static`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `el.rule` as enum variant `Some` which is behind a shared reference
[INFO] [stdout]   --> src/action.rs:39:36
[INFO] [stdout]    |
[INFO] [stdout] 39 |         } else if let Some(rule) = el.rule {
[INFO] [stdout]    |                            ----    ^^^^^^^
[INFO] [stdout]    |                            |
[INFO] [stdout]    |                            data moved here
[INFO] [stdout]    |                            move occurs because `rule` has type `JsonElement<'_>`, which does not implement the `Copy` trait
[INFO] [stdout]    |
[INFO] [stdout] help: consider borrowing here
[INFO] [stdout]    |
[INFO] [stdout] 39 |         } else if let Some(rule) = &el.rule {
[INFO] [stdout]    |                                    +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0381]: used binding `elements` isn't initialized
[INFO] [stdout]   --> src/action.rs:44:5
[INFO] [stdout]    |
[INFO] [stdout] 34 |     let mut elements: Vec<ElementType<'a>>;
[INFO] [stdout]    |         ------------ binding declared here but left uninitialized
[INFO] [stdout] ...
[INFO] [stdout] 44 |     elements
[INFO] [stdout]    |     ^^^^^^^^ `elements` used here but it isn't initialized
[INFO] [stdout]    |
[INFO] [stdout] help: consider assigning a value
[INFO] [stdout]    |
[INFO] [stdout] 34 |     let mut elements: Vec<ElementType<'a>> = vec![];
[INFO] [stdout]    |                                            ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0308, E0381, E0382, E0507, E0521, E0597.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0308`.
[INFO] [stdout] 
[INFO] running `Command { std: "docker" "inspect" "33761b798bf6536409abe9cd9d23b76f68dea5f258a592b1a6cc4cf0ccf2a012", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "33761b798bf6536409abe9cd9d23b76f68dea5f258a592b1a6cc4cf0ccf2a012", kill_on_drop: false }`
[INFO] [stdout] 33761b798bf6536409abe9cd9d23b76f68dea5f258a592b1a6cc4cf0ccf2a012
