[INFO] fetching crate rust-sitter-macro 0.3.4...
[INFO] testing rust-sitter-macro-0.3.4 against 1.73.0 for beta-1.74-1
[INFO] extracting crate rust-sitter-macro 0.3.4 into /workspace/builds/worker-0-tc1/source
[INFO] validating manifest of crates.io crate rust-sitter-macro 0.3.4 on toolchain 1.73.0
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.73.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] started tweaking crates.io crate rust-sitter-macro 0.3.4
[INFO] finished tweaking crates.io crate rust-sitter-macro 0.3.4
[INFO] tweaked toml for crates.io crate rust-sitter-macro 0.3.4 written to /workspace/builds/worker-0-tc1/source/Cargo.toml
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.73.0" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Updating crates.io index
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.73.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+1.73.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 16e97d7285b0421495aa3112bbe525125aaa050e516839999a94b85b751fa822
[INFO] running `Command { std: "docker" "start" "-a" "16e97d7285b0421495aa3112bbe525125aaa050e516839999a94b85b751fa822", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "16e97d7285b0421495aa3112bbe525125aaa050e516839999a94b85b751fa822", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "16e97d7285b0421495aa3112bbe525125aaa050e516839999a94b85b751fa822", kill_on_drop: false }`
[INFO] [stdout] 16e97d7285b0421495aa3112bbe525125aaa050e516839999a94b85b751fa822
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+1.73.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] a950dc1a378628129fa1aafbf75f52b3751ebbd203b405311b195d537321e013
[INFO] running `Command { std: "docker" "start" "-a" "a950dc1a378628129fa1aafbf75f52b3751ebbd203b405311b195d537321e013", kill_on_drop: false }`
[INFO] [stderr]    Compiling rust-sitter-common v0.3.4
[INFO] [stderr]    Compiling rust-sitter-macro v0.3.4 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished dev [unoptimized + debuginfo] target(s) in 1.64s
[INFO] running `Command { std: "docker" "inspect" "a950dc1a378628129fa1aafbf75f52b3751ebbd203b405311b195d537321e013", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "a950dc1a378628129fa1aafbf75f52b3751ebbd203b405311b195d537321e013", kill_on_drop: false }`
[INFO] [stdout] a950dc1a378628129fa1aafbf75f52b3751ebbd203b405311b195d537321e013
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+1.73.0" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 073c2d97a735ec29384b5e981ba38ee13a6d1f07b0eced5fdd71113082d8ed07
[INFO] running `Command { std: "docker" "start" "-a" "073c2d97a735ec29384b5e981ba38ee13a6d1f07b0eced5fdd71113082d8ed07", kill_on_drop: false }`
[INFO] [stderr]    Compiling rustix v0.38.18
[INFO] [stderr]    Compiling linux-raw-sys v0.4.10
[INFO] [stderr]    Compiling linked-hash-map v0.5.6
[INFO] [stderr]    Compiling lazy_static v1.4.0
[INFO] [stderr]    Compiling libc v0.2.149
[INFO] [stderr]    Compiling bitflags v2.4.0
[INFO] [stderr]    Compiling similar v2.3.0
[INFO] [stderr]    Compiling cfg-if v1.0.0
[INFO] [stderr]    Compiling fastrand v2.0.1
[INFO] [stderr]    Compiling rust-sitter-macro v0.3.4 (/opt/rustwide/workdir)
[INFO] [stderr]    Compiling yaml-rust v0.4.5
[INFO] [stderr]    Compiling console v0.15.7
[INFO] [stderr]    Compiling insta v1.33.0
[INFO] [stderr]    Compiling tempfile v3.8.0
[INFO] [stderr]     Finished test [unoptimized + debuginfo] target(s) in 7.65s
[INFO] running `Command { std: "docker" "inspect" "073c2d97a735ec29384b5e981ba38ee13a6d1f07b0eced5fdd71113082d8ed07", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "073c2d97a735ec29384b5e981ba38ee13a6d1f07b0eced5fdd71113082d8ed07", kill_on_drop: false }`
[INFO] [stdout] 073c2d97a735ec29384b5e981ba38ee13a6d1f07b0eced5fdd71113082d8ed07
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+1.73.0" "test" "--frozen", kill_on_drop: false }`
[INFO] [stdout] e43331aa97c438ed02363cccc4ac40f0de4267554d9a6a849099cea1305386b2
[INFO] running `Command { std: "docker" "start" "-a" "e43331aa97c438ed02363cccc4ac40f0de4267554d9a6a849099cea1305386b2", kill_on_drop: false }`
[INFO] [stderr]     Finished test [unoptimized + debuginfo] target(s) in 0.02s
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/rust_sitter_macro-3448bef8b1fe12d9)
[INFO] [stdout] 
[INFO] [stdout] running 10 tests
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stdout] test tests::enum_prec_left ... FAILED
[INFO] [stdout] test tests::enum_with_named_field ... FAILED
[INFO] [stdout] test tests::enum_recursive ... FAILED
[INFO] [stdout] test tests::enum_transformed_fields ... FAILED
[INFO] [stdout] test tests::struct_extra ... FAILED
[INFO] [stdout] test tests::enum_with_unamed_vector ... FAILED
[INFO] [stdout] test tests::spanned_in_vec ... FAILED
[INFO] [stdout] test tests::grammar_unboxed_field ... FAILED
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.73.0-x86_64-unknown-linux-gnu'
[INFO] [stderr] To install, run `rustup component add rustfmt --toolchain 1.73.0-x86_64-unknown-linux-gnu`
[INFO] [stdout] test tests::struct_optional ... FAILED
[INFO] [stdout] test tests::struct_repeat ... FAILED
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout] 
[INFO] [stdout] ---- tests::enum_prec_left stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__enum_prec_left.snap
[INFO] [stdout] Snapshot: enum_prec_left
[INFO] [stdout] Source: src/lib.rs:287
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub enum Expression
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] i32), #[rust_sitter :: prec_left(1)]
[INFO] [stdout]                                     Sub(Box < Expression >, #[rust_sitter :: leaf(text = "-")]
[INFO] [stdout]                                     (), Box < Expression >),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub enum Expression {
[INFO] [stdout]     2       │-        Number(i32),
[INFO] [stdout]     3       │-        Sub(Box<Expression>, (), Box<Expression>),
[INFO] [stdout]     4       │-    }
[INFO] [stdout]     5       │-    impl rust_sitter::Extract<Expression> for Expression {
[INFO] [stdout]     6       │-        type LeafFn = ();
[INFO] [stdout]     7       │-        #[allow(non_snake_case)]
[INFO] [stdout]     8       │-        fn extract(
[INFO] [stdout]     9       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    10       │-            source: &[u8],
[INFO] [stdout]    11       │-            _last_idx: usize,
[INFO] [stdout]    12       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    13       │-        ) -> Self {
[INFO] [stdout]    14       │-            let node = node.unwrap();
[INFO] [stdout]    15       │-            #[allow(non_snake_case)]
[INFO] [stdout]    16       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    17       │-            fn extract_Expression_Number_0(
[INFO] [stdout]    18       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    19       │-                source: &[u8],
[INFO] [stdout]    20       │-                last_idx: &mut usize,
[INFO] [stdout]    21       │-            ) -> i32 {
[INFO] [stdout]    22       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    23       │-                    loop {
[INFO] [stdout]    24       │-                        let n = cursor.node();
[INFO] [stdout]    25       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    26       │-                            if name == "0" {
[INFO] [stdout]    27       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    28       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    29       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    30       │-                                    *cursor_opt = None;
[INFO] [stdout]    31       │-                                };
[INFO] [stdout]    32       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    33       │-                                return out;
[INFO] [stdout]    34       │-                            } else {
[INFO] [stdout]    35       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    36       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    37       │-                            }
[INFO] [stdout]    38       │-                        } else {
[INFO] [stdout]    39       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    40       │-                        }
[INFO] [stdout]    41       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    42       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    43       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    44       │-                        }
[INFO] [stdout]    45       │-                    }
[INFO] [stdout]    46       │-                } else {
[INFO] [stdout]    47       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    48       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    49       │-                        node,
[INFO] [stdout]    50       │-                        source,
[INFO] [stdout]    51       │-                        *last_idx,
[INFO] [stdout]    52       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    53       │-                    );
[INFO] [stdout]    54       │-                }
[INFO] [stdout]    55       │-            }
[INFO] [stdout]    56       │-            #[allow(non_snake_case)]
[INFO] [stdout]    57       │-            fn extract_Expression_Number(
[INFO] [stdout]    58       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    59       │-                source: &[u8],
[INFO] [stdout]    60       │-            ) -> Expression {
[INFO] [stdout]    61       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    62       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    63       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    64       │-                    Some(parent_cursor)
[INFO] [stdout]    65       │-                } else {
[INFO] [stdout]    66       │-                    None
[INFO] [stdout]    67       │-                };
[INFO] [stdout]    68       │-                Expression::Number(extract_Expression_Number_0(
[INFO] [stdout]    69       │-                    &mut cursor,
[INFO] [stdout]    70       │-                    source,
[INFO] [stdout]    71       │-                    &mut last_idx,
[INFO] [stdout]    72       │-                ))
[INFO] [stdout]    73       │-            }
[INFO] [stdout]    74       │-            #[allow(non_snake_case)]
[INFO] [stdout]    75       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    76       │-            fn extract_Expression_Sub_0(
[INFO] [stdout]    77       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    78       │-                source: &[u8],
[INFO] [stdout]    79       │-                last_idx: &mut usize,
[INFO] [stdout]    80       │-            ) -> Box<Expression> {
[INFO] [stdout]    81       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    82       │-                    loop {
[INFO] [stdout]    83       │-                        let n = cursor.node();
[INFO] [stdout]    84       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    85       │-                            if name == "0" {
[INFO] [stdout]    86       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    87       │-                                let out = <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    88       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    89       │-                                );
[INFO] [stdout]    90       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    91       │-                                    *cursor_opt = None;
[INFO] [stdout]    92       │-                                };
[INFO] [stdout]    93       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    94       │-                                return out;
[INFO] [stdout]    95       │-                            } else {
[INFO] [stdout]    96       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    97       │-                                return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    98       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    99       │-                                );
[INFO] [stdout]   100       │-                            }
[INFO] [stdout]   101       │-                        } else {
[INFO] [stdout]   102       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   103       │-                        }
[INFO] [stdout]   104       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   105       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   106       │-                            return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   107       │-                                node, source, *last_idx, None,
[INFO] [stdout]   108       │-                            );
[INFO] [stdout]   109       │-                        }
[INFO] [stdout]   110       │-                    }
[INFO] [stdout]   111       │-                } else {
[INFO] [stdout]   112       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   113       │-                    return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   114       │-                        node, source, *last_idx, None,
[INFO] [stdout]   115       │-                    );
[INFO] [stdout]   116       │-                }
[INFO] [stdout]   117       │-            }
[INFO] [stdout]   118       │-            #[allow(non_snake_case)]
[INFO] [stdout]   119       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   120       │-            fn extract_Expression_Sub_1(
[INFO] [stdout]   121       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   122       │-                source: &[u8],
[INFO] [stdout]   123       │-                last_idx: &mut usize,
[INFO] [stdout]   124       │-            ) -> () {
[INFO] [stdout]   125       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   126       │-                    loop {
[INFO] [stdout]   127       │-                        let n = cursor.node();
[INFO] [stdout]   128       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   129       │-                            if name == "1" {
[INFO] [stdout]   130       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   131       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   132       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   133       │-                                );
[INFO] [stdout]   134       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   135       │-                                    *cursor_opt = None;
[INFO] [stdout]   136       │-                                };
[INFO] [stdout]   137       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   138       │-                                return out;
[INFO] [stdout]   139       │-                            } else {
[INFO] [stdout]   140       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   141       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   142       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   143       │-                                );
[INFO] [stdout]   144       │-                            }
[INFO] [stdout]   145       │-                        } else {
[INFO] [stdout]   146       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   147       │-                        }
[INFO] [stdout]   148       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   149       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   150       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   151       │-                                node, source, *last_idx, None,
[INFO] [stdout]   152       │-                            );
[INFO] [stdout]   153       │-                        }
[INFO] [stdout]   154       │-                    }
[INFO] [stdout]   155       │-                } else {
[INFO] [stdout]   156       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   157       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   158       │-                }
[INFO] [stdout]   159       │-            }
[INFO] [stdout]   160       │-            #[allow(non_snake_case)]
[INFO] [stdout]   161       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   162       │-            fn extract_Expression_Sub_2(
[INFO] [stdout]   163       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   164       │-                source: &[u8],
[INFO] [stdout]   165       │-                last_idx: &mut usize,
[INFO] [stdout]   166       │-            ) -> Box<Expression> {
[INFO] [stdout]   167       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   168       │-                    loop {
[INFO] [stdout]   169       │-                        let n = cursor.node();
[INFO] [stdout]   170       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   171       │-                            if name == "2" {
[INFO] [stdout]   172       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   173       │-                                let out = <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   174       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   175       │-                                );
[INFO] [stdout]   176       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   177       │-                                    *cursor_opt = None;
[INFO] [stdout]   178       │-                                };
[INFO] [stdout]   179       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   180       │-                                return out;
[INFO] [stdout]   181       │-                            } else {
[INFO] [stdout]   182       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   183       │-                                return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   184       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   185       │-                                );
[INFO] [stdout]   186       │-                            }
[INFO] [stdout]   187       │-                        } else {
[INFO] [stdout]   188       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   189       │-                        }
[INFO] [stdout]   190       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   191       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   192       │-                            return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   193       │-                                node, source, *last_idx, None,
[INFO] [stdout]   194       │-                            );
[INFO] [stdout]   195       │-                        }
[INFO] [stdout]   196       │-                    }
[INFO] [stdout]   197       │-                } else {
[INFO] [stdout]   198       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   199       │-                    return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   200       │-                        node, source, *last_idx, None,
[INFO] [stdout]   201       │-                    );
[INFO] [stdout]   202       │-                }
[INFO] [stdout]   203       │-            }
[INFO] [stdout]   204       │-            #[allow(non_snake_case)]
[INFO] [stdout]   205       │-            fn extract_Expression_Sub(
[INFO] [stdout]   206       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   207       │-                source: &[u8],
[INFO] [stdout]   208       │-            ) -> Expression {
[INFO] [stdout]   209       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   210       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   211       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   212       │-                    Some(parent_cursor)
[INFO] [stdout]   213       │-                } else {
[INFO] [stdout]   214       │-                    None
[INFO] [stdout]   215       │-                };
[INFO] [stdout]   216       │-                Expression::Sub(
[INFO] [stdout]   217       │-                    extract_Expression_Sub_0(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   218       │-                    extract_Expression_Sub_1(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   219       │-                    extract_Expression_Sub_2(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   220       │-                )
[INFO] [stdout]   221       │-            }
[INFO] [stdout]   222       │-            let mut cursor = node.walk();
[INFO] [stdout]   223       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]   224       │-            loop {
[INFO] [stdout]   225       │-                let n = cursor.node();
[INFO] [stdout]   226       │-                match n.kind() {
[INFO] [stdout]   227       │-                    "Expression_Number" => return extract_Expression_Number(n, source),
[INFO] [stdout]   228       │-                    "Expression_Sub" => return extract_Expression_Sub(n, source),
[INFO] [stdout]   229       │-                    _ => {
[INFO] [stdout]   230       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   231       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]   232       │-                        }
[INFO] [stdout]   233       │-                    }
[INFO] [stdout]   234       │-                }
[INFO] [stdout]   235       │-            }
[INFO] [stdout]   236       │-        }
[INFO] [stdout]   237       │-    }
[INFO] [stdout]   238       │-    extern "C" {
[INFO] [stdout]   239       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   240       │-    }
[INFO] [stdout]   241       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   242       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   243       │-    }
[INFO] [stdout]   244       │-    pub fn parse(
[INFO] [stdout]   245       │-        input: &str,
[INFO] [stdout]   246       │-    ) -> core::result::Result<Expression, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   247       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   248       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   249       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   250       │-        let root_node = tree.root_node();
[INFO] [stdout]   251       │-        if root_node.has_error() {
[INFO] [stdout]   252       │-            let mut errors = vec![];
[INFO] [stdout]   253       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   254       │-            Err(errors)
[INFO] [stdout]   255       │-        } else {
[INFO] [stdout]   256       │-            use rust_sitter::Extract;
[INFO] [stdout]   257       │-            Ok(<Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   258       │-                Some(root_node),
[INFO] [stdout]   259       │-                input.as_bytes(),
[INFO] [stdout]   260       │-                0,
[INFO] [stdout]   261       │-                None,
[INFO] [stdout]   262       │-            ))
[INFO] [stdout]   263       │-        }
[INFO] [stdout]   264       │-    }
[INFO] [stdout]   265       │-}
[INFO] [stdout]           0 │+mod grammar { pub enum Expression { Number (i32) , Sub (Box < Expression > , () , Box < Expression >) , } impl rust_sitter :: Extract < Expression > for Expression { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expression_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Number (extract_Expression_Number_0 (& mut cursor , source , & mut last_idx)) } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Sub_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Box < Expression > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Sub_1 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "1" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Sub_2 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Box < Expression > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "2" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Expression_Sub (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Sub (extract_Expression_Sub_0 (& mut cursor , source , & mut last_idx) , extract_Expression_Sub_1 (& mut cursor , source , & mut last_idx) , extract_Expression_Sub_2 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expression_Number" => return extract_Expression_Number (n , source) , "Expression_Sub" => return extract_Expression_Sub (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expression as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::enum_prec_left' panicked at src/lib.rs:287:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a529f - rust_sitter_macro::tests::enum_prec_left::he483aaef9bd0149d
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:287:9
[INFO] [stdout]   22:     0x560fa65a3ed7 - rust_sitter_macro::tests::enum_prec_left::{{closure}}::hc626c76542501d7b
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:286:25
[INFO] [stdout]   23:     0x560fa65b6d86 - core::ops::function::FnOnce::call_once::hee347b11fe1b310b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::enum_with_named_field stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__enum_with_named_field.snap
[INFO] [stdout] Snapshot: enum_with_named_field
[INFO] [stdout] Source: src/lib.rs:440
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub enum Expr
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] u32), Neg
[INFO] [stdout]                                     {
[INFO] [stdout]                                         #[rust_sitter :: leaf(text = "!")] _bang : (), value : Box <
[INFO] [stdout]                                         Expr >,
[INFO] [stdout]                                     }
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub enum Expr {
[INFO] [stdout]     2       │-        Number(u32),
[INFO] [stdout]     3       │-        Neg { _bang: (), value: Box<Expr> },
[INFO] [stdout]     4       │-    }
[INFO] [stdout]     5       │-    impl rust_sitter::Extract<Expr> for Expr {
[INFO] [stdout]     6       │-        type LeafFn = ();
[INFO] [stdout]     7       │-        #[allow(non_snake_case)]
[INFO] [stdout]     8       │-        fn extract(
[INFO] [stdout]     9       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    10       │-            source: &[u8],
[INFO] [stdout]    11       │-            _last_idx: usize,
[INFO] [stdout]    12       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    13       │-        ) -> Self {
[INFO] [stdout]    14       │-            let node = node.unwrap();
[INFO] [stdout]    15       │-            #[allow(non_snake_case)]
[INFO] [stdout]    16       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    17       │-            fn extract_Expr_Number_0(
[INFO] [stdout]    18       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    19       │-                source: &[u8],
[INFO] [stdout]    20       │-                last_idx: &mut usize,
[INFO] [stdout]    21       │-            ) -> u32 {
[INFO] [stdout]    22       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    23       │-                    loop {
[INFO] [stdout]    24       │-                        let n = cursor.node();
[INFO] [stdout]    25       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    26       │-                            if name == "0" {
[INFO] [stdout]    27       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    28       │-                                let out = < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    29       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    30       │-                                    *cursor_opt = None;
[INFO] [stdout]    31       │-                                };
[INFO] [stdout]    32       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    33       │-                                return out;
[INFO] [stdout]    34       │-                            } else {
[INFO] [stdout]    35       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    36       │-                                return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    37       │-                            }
[INFO] [stdout]    38       │-                        } else {
[INFO] [stdout]    39       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    40       │-                        }
[INFO] [stdout]    41       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    42       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    43       │-                            return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    44       │-                        }
[INFO] [stdout]    45       │-                    }
[INFO] [stdout]    46       │-                } else {
[INFO] [stdout]    47       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    48       │-                    return <rust_sitter::WithLeaf<u32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    49       │-                        node,
[INFO] [stdout]    50       │-                        source,
[INFO] [stdout]    51       │-                        *last_idx,
[INFO] [stdout]    52       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    53       │-                    );
[INFO] [stdout]    54       │-                }
[INFO] [stdout]    55       │-            }
[INFO] [stdout]    56       │-            #[allow(non_snake_case)]
[INFO] [stdout]    57       │-            fn extract_Expr_Number(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Expr {
[INFO] [stdout]    58       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    59       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    60       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    61       │-                    Some(parent_cursor)
[INFO] [stdout]    62       │-                } else {
[INFO] [stdout]    63       │-                    None
[INFO] [stdout]    64       │-                };
[INFO] [stdout]    65       │-                Expr::Number(extract_Expr_Number_0(&mut cursor, source, &mut last_idx))
[INFO] [stdout]    66       │-            }
[INFO] [stdout]    67       │-            #[allow(non_snake_case)]
[INFO] [stdout]    68       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    69       │-            fn extract_Expr_Neg__bang(
[INFO] [stdout]    70       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    71       │-                source: &[u8],
[INFO] [stdout]    72       │-                last_idx: &mut usize,
[INFO] [stdout]    73       │-            ) -> () {
[INFO] [stdout]    74       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    75       │-                    loop {
[INFO] [stdout]    76       │-                        let n = cursor.node();
[INFO] [stdout]    77       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    78       │-                            if name == "_bang" {
[INFO] [stdout]    79       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    80       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    81       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    82       │-                                );
[INFO] [stdout]    83       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    84       │-                                    *cursor_opt = None;
[INFO] [stdout]    85       │-                                };
[INFO] [stdout]    86       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    87       │-                                return out;
[INFO] [stdout]    88       │-                            } else {
[INFO] [stdout]    89       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    90       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    91       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    92       │-                                );
[INFO] [stdout]    93       │-                            }
[INFO] [stdout]    94       │-                        } else {
[INFO] [stdout]    95       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    96       │-                        }
[INFO] [stdout]    97       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    98       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    99       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   100       │-                                node, source, *last_idx, None,
[INFO] [stdout]   101       │-                            );
[INFO] [stdout]   102       │-                        }
[INFO] [stdout]   103       │-                    }
[INFO] [stdout]   104       │-                } else {
[INFO] [stdout]   105       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   106       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   107       │-                }
[INFO] [stdout]   108       │-            }
[INFO] [stdout]   109       │-            #[allow(non_snake_case)]
[INFO] [stdout]   110       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   111       │-            fn extract_Expr_Neg_value(
[INFO] [stdout]   112       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   113       │-                source: &[u8],
[INFO] [stdout]   114       │-                last_idx: &mut usize,
[INFO] [stdout]   115       │-            ) -> Box<Expr> {
[INFO] [stdout]   116       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   117       │-                    loop {
[INFO] [stdout]   118       │-                        let n = cursor.node();
[INFO] [stdout]   119       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   120       │-                            if name == "value" {
[INFO] [stdout]   121       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   122       │-                                let out = <Box<Expr> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   123       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   124       │-                                );
[INFO] [stdout]   125       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   126       │-                                    *cursor_opt = None;
[INFO] [stdout]   127       │-                                };
[INFO] [stdout]   128       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   129       │-                                return out;
[INFO] [stdout]   130       │-                            } else {
[INFO] [stdout]   131       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   132       │-                                return <Box<Expr> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   133       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   134       │-                                );
[INFO] [stdout]   135       │-                            }
[INFO] [stdout]   136       │-                        } else {
[INFO] [stdout]   137       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   138       │-                        }
[INFO] [stdout]   139       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   140       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   141       │-                            return <Box<Expr> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   142       │-                                node, source, *last_idx, None,
[INFO] [stdout]   143       │-                            );
[INFO] [stdout]   144       │-                        }
[INFO] [stdout]   145       │-                    }
[INFO] [stdout]   146       │-                } else {
[INFO] [stdout]   147       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   148       │-                    return <Box<Expr> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   149       │-                        node, source, *last_idx, None,
[INFO] [stdout]   150       │-                    );
[INFO] [stdout]   151       │-                }
[INFO] [stdout]   152       │-            }
[INFO] [stdout]   153       │-            #[allow(non_snake_case)]
[INFO] [stdout]   154       │-            fn extract_Expr_Neg(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Expr {
[INFO] [stdout]   155       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   156       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   157       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   158       │-                    Some(parent_cursor)
[INFO] [stdout]   159       │-                } else {
[INFO] [stdout]   160       │-                    None
[INFO] [stdout]   161       │-                };
[INFO] [stdout]   162       │-                Expr::Neg {
[INFO] [stdout]   163       │-                    _bang: extract_Expr_Neg__bang(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   164       │-                    value: extract_Expr_Neg_value(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   165       │-                }
[INFO] [stdout]   166       │-            }
[INFO] [stdout]   167       │-            let mut cursor = node.walk();
[INFO] [stdout]   168       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]   169       │-            loop {
[INFO] [stdout]   170       │-                let n = cursor.node();
[INFO] [stdout]   171       │-                match n.kind() {
[INFO] [stdout]   172       │-                    "Expr_Number" => return extract_Expr_Number(n, source),
[INFO] [stdout]   173       │-                    "Expr_Neg" => return extract_Expr_Neg(n, source),
[INFO] [stdout]   174       │-                    _ => {
[INFO] [stdout]   175       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   176       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]   177       │-                        }
[INFO] [stdout]   178       │-                    }
[INFO] [stdout]   179       │-                }
[INFO] [stdout]   180       │-            }
[INFO] [stdout]   181       │-        }
[INFO] [stdout]   182       │-    }
[INFO] [stdout]   183       │-    extern "C" {
[INFO] [stdout]   184       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   185       │-    }
[INFO] [stdout]   186       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   187       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   188       │-    }
[INFO] [stdout]   189       │-    pub fn parse(input: &str) -> core::result::Result<Expr, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   190       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   191       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   192       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   193       │-        let root_node = tree.root_node();
[INFO] [stdout]   194       │-        if root_node.has_error() {
[INFO] [stdout]   195       │-            let mut errors = vec![];
[INFO] [stdout]   196       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   197       │-            Err(errors)
[INFO] [stdout]   198       │-        } else {
[INFO] [stdout]   199       │-            use rust_sitter::Extract;
[INFO] [stdout]   200       │-            Ok(<Expr as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   201       │-                Some(root_node),
[INFO] [stdout]   202       │-                input.as_bytes(),
[INFO] [stdout]   203       │-                0,
[INFO] [stdout]   204       │-                None,
[INFO] [stdout]   205       │-            ))
[INFO] [stdout]   206       │-        }
[INFO] [stdout]   207       │-    }
[INFO] [stdout]   208       │-}
[INFO] [stdout]           0 │+mod grammar { pub enum Expr { Number (u32) , Neg { _bang : () , value : Box < Expr > , } } impl rust_sitter :: Extract < Expr > for Expr { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expr_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> u32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expr_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expr { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expr :: Number (extract_Expr_Number_0 (& mut cursor , source , & mut last_idx)) } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expr_Neg__bang (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "_bang" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expr_Neg_value (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Box < Expr > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "value" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Box < Expr > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expr > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expr > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expr > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Expr_Neg (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expr { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expr :: Neg { _bang : extract_Expr_Neg__bang (& mut cursor , source , & mut last_idx) , value : extract_Expr_Neg_value (& mut cursor , source , & mut last_idx) } } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expr_Number" => return extract_Expr_Number (n , source) , "Expr_Neg" => return extract_Expr_Neg (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expr , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expr as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::enum_with_named_field' panicked at src/lib.rs:440:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65ac442 - rust_sitter_macro::tests::enum_with_named_field::hfa5da0c87873ce59
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:440:9
[INFO] [stdout]   22:     0x560fa65ab227 - rust_sitter_macro::tests::enum_with_named_field::{{closure}}::hc09f8c7c8038040a
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:439:32
[INFO] [stdout]   23:     0x560fa65b6bd6 - core::ops::function::FnOnce::call_once::h8d7b2fb91eefb58c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::enum_recursive stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__enum_recursive.snap
[INFO] [stdout] Snapshot: enum_recursive
[INFO] [stdout] Source: src/lib.rs:262
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub enum Expression
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] i32),
[INFO] [stdout]                                     Neg(#[rust_sitter :: leaf(text = "-")] (), Box < Expression
[INFO] [stdout]                                     >),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub enum Expression {
[INFO] [stdout]     2       │-        Number(i32),
[INFO] [stdout]     3       │-        Neg((), Box<Expression>),
[INFO] [stdout]     4       │-    }
[INFO] [stdout]     5       │-    impl rust_sitter::Extract<Expression> for Expression {
[INFO] [stdout]     6       │-        type LeafFn = ();
[INFO] [stdout]     7       │-        #[allow(non_snake_case)]
[INFO] [stdout]     8       │-        fn extract(
[INFO] [stdout]     9       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    10       │-            source: &[u8],
[INFO] [stdout]    11       │-            _last_idx: usize,
[INFO] [stdout]    12       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    13       │-        ) -> Self {
[INFO] [stdout]    14       │-            let node = node.unwrap();
[INFO] [stdout]    15       │-            #[allow(non_snake_case)]
[INFO] [stdout]    16       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    17       │-            fn extract_Expression_Number_0(
[INFO] [stdout]    18       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    19       │-                source: &[u8],
[INFO] [stdout]    20       │-                last_idx: &mut usize,
[INFO] [stdout]    21       │-            ) -> i32 {
[INFO] [stdout]    22       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    23       │-                    loop {
[INFO] [stdout]    24       │-                        let n = cursor.node();
[INFO] [stdout]    25       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    26       │-                            if name == "0" {
[INFO] [stdout]    27       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    28       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    29       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    30       │-                                    *cursor_opt = None;
[INFO] [stdout]    31       │-                                };
[INFO] [stdout]    32       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    33       │-                                return out;
[INFO] [stdout]    34       │-                            } else {
[INFO] [stdout]    35       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    36       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    37       │-                            }
[INFO] [stdout]    38       │-                        } else {
[INFO] [stdout]    39       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    40       │-                        }
[INFO] [stdout]    41       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    42       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    43       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    44       │-                        }
[INFO] [stdout]    45       │-                    }
[INFO] [stdout]    46       │-                } else {
[INFO] [stdout]    47       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    48       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    49       │-                        node,
[INFO] [stdout]    50       │-                        source,
[INFO] [stdout]    51       │-                        *last_idx,
[INFO] [stdout]    52       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    53       │-                    );
[INFO] [stdout]    54       │-                }
[INFO] [stdout]    55       │-            }
[INFO] [stdout]    56       │-            #[allow(non_snake_case)]
[INFO] [stdout]    57       │-            fn extract_Expression_Number(
[INFO] [stdout]    58       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    59       │-                source: &[u8],
[INFO] [stdout]    60       │-            ) -> Expression {
[INFO] [stdout]    61       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    62       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    63       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    64       │-                    Some(parent_cursor)
[INFO] [stdout]    65       │-                } else {
[INFO] [stdout]    66       │-                    None
[INFO] [stdout]    67       │-                };
[INFO] [stdout]    68       │-                Expression::Number(extract_Expression_Number_0(
[INFO] [stdout]    69       │-                    &mut cursor,
[INFO] [stdout]    70       │-                    source,
[INFO] [stdout]    71       │-                    &mut last_idx,
[INFO] [stdout]    72       │-                ))
[INFO] [stdout]    73       │-            }
[INFO] [stdout]    74       │-            #[allow(non_snake_case)]
[INFO] [stdout]    75       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    76       │-            fn extract_Expression_Neg_0(
[INFO] [stdout]    77       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    78       │-                source: &[u8],
[INFO] [stdout]    79       │-                last_idx: &mut usize,
[INFO] [stdout]    80       │-            ) -> () {
[INFO] [stdout]    81       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    82       │-                    loop {
[INFO] [stdout]    83       │-                        let n = cursor.node();
[INFO] [stdout]    84       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    85       │-                            if name == "0" {
[INFO] [stdout]    86       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    87       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    88       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    89       │-                                );
[INFO] [stdout]    90       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    91       │-                                    *cursor_opt = None;
[INFO] [stdout]    92       │-                                };
[INFO] [stdout]    93       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    94       │-                                return out;
[INFO] [stdout]    95       │-                            } else {
[INFO] [stdout]    96       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    97       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    98       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    99       │-                                );
[INFO] [stdout]   100       │-                            }
[INFO] [stdout]   101       │-                        } else {
[INFO] [stdout]   102       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   103       │-                        }
[INFO] [stdout]   104       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   105       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   106       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   107       │-                                node, source, *last_idx, None,
[INFO] [stdout]   108       │-                            );
[INFO] [stdout]   109       │-                        }
[INFO] [stdout]   110       │-                    }
[INFO] [stdout]   111       │-                } else {
[INFO] [stdout]   112       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   113       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   114       │-                }
[INFO] [stdout]   115       │-            }
[INFO] [stdout]   116       │-            #[allow(non_snake_case)]
[INFO] [stdout]   117       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   118       │-            fn extract_Expression_Neg_1(
[INFO] [stdout]   119       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   120       │-                source: &[u8],
[INFO] [stdout]   121       │-                last_idx: &mut usize,
[INFO] [stdout]   122       │-            ) -> Box<Expression> {
[INFO] [stdout]   123       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   124       │-                    loop {
[INFO] [stdout]   125       │-                        let n = cursor.node();
[INFO] [stdout]   126       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   127       │-                            if name == "1" {
[INFO] [stdout]   128       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   129       │-                                let out = <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   130       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   131       │-                                );
[INFO] [stdout]   132       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   133       │-                                    *cursor_opt = None;
[INFO] [stdout]   134       │-                                };
[INFO] [stdout]   135       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   136       │-                                return out;
[INFO] [stdout]   137       │-                            } else {
[INFO] [stdout]   138       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   139       │-                                return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   140       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   141       │-                                );
[INFO] [stdout]   142       │-                            }
[INFO] [stdout]   143       │-                        } else {
[INFO] [stdout]   144       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   145       │-                        }
[INFO] [stdout]   146       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   147       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   148       │-                            return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   149       │-                                node, source, *last_idx, None,
[INFO] [stdout]   150       │-                            );
[INFO] [stdout]   151       │-                        }
[INFO] [stdout]   152       │-                    }
[INFO] [stdout]   153       │-                } else {
[INFO] [stdout]   154       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   155       │-                    return <Box<Expression> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   156       │-                        node, source, *last_idx, None,
[INFO] [stdout]   157       │-                    );
[INFO] [stdout]   158       │-                }
[INFO] [stdout]   159       │-            }
[INFO] [stdout]   160       │-            #[allow(non_snake_case)]
[INFO] [stdout]   161       │-            fn extract_Expression_Neg(
[INFO] [stdout]   162       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   163       │-                source: &[u8],
[INFO] [stdout]   164       │-            ) -> Expression {
[INFO] [stdout]   165       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   166       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   167       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   168       │-                    Some(parent_cursor)
[INFO] [stdout]   169       │-                } else {
[INFO] [stdout]   170       │-                    None
[INFO] [stdout]   171       │-                };
[INFO] [stdout]   172       │-                Expression::Neg(
[INFO] [stdout]   173       │-                    extract_Expression_Neg_0(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   174       │-                    extract_Expression_Neg_1(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   175       │-                )
[INFO] [stdout]   176       │-            }
[INFO] [stdout]   177       │-            let mut cursor = node.walk();
[INFO] [stdout]   178       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]   179       │-            loop {
[INFO] [stdout]   180       │-                let n = cursor.node();
[INFO] [stdout]   181       │-                match n.kind() {
[INFO] [stdout]   182       │-                    "Expression_Number" => return extract_Expression_Number(n, source),
[INFO] [stdout]   183       │-                    "Expression_Neg" => return extract_Expression_Neg(n, source),
[INFO] [stdout]   184       │-                    _ => {
[INFO] [stdout]   185       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   186       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]   187       │-                        }
[INFO] [stdout]   188       │-                    }
[INFO] [stdout]   189       │-                }
[INFO] [stdout]   190       │-            }
[INFO] [stdout]   191       │-        }
[INFO] [stdout]   192       │-    }
[INFO] [stdout]   193       │-    extern "C" {
[INFO] [stdout]   194       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   195       │-    }
[INFO] [stdout]   196       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   197       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   198       │-    }
[INFO] [stdout]   199       │-    pub fn parse(
[INFO] [stdout]   200       │-        input: &str,
[INFO] [stdout]   201       │-    ) -> core::result::Result<Expression, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   202       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   203       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   204       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   205       │-        let root_node = tree.root_node();
[INFO] [stdout]   206       │-        if root_node.has_error() {
[INFO] [stdout]   207       │-            let mut errors = vec![];
[INFO] [stdout]   208       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   209       │-            Err(errors)
[INFO] [stdout]   210       │-        } else {
[INFO] [stdout]   211       │-            use rust_sitter::Extract;
[INFO] [stdout]   212       │-            Ok(<Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   213       │-                Some(root_node),
[INFO] [stdout]   214       │-                input.as_bytes(),
[INFO] [stdout]   215       │-                0,
[INFO] [stdout]   216       │-                None,
[INFO] [stdout]   217       │-            ))
[INFO] [stdout]   218       │-        }
[INFO] [stdout]   219       │-    }
[INFO] [stdout]   220       │-}
[INFO] [stdout]           0 │+mod grammar { pub enum Expression { Number (i32) , Neg (() , Box < Expression >) , } impl rust_sitter :: Extract < Expression > for Expression { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expression_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Number (extract_Expression_Number_0 (& mut cursor , source , & mut last_idx)) } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Neg_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Neg_1 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Box < Expression > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "1" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Box < Expression > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Expression_Neg (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Neg (extract_Expression_Neg_0 (& mut cursor , source , & mut last_idx) , extract_Expression_Neg_1 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expression_Number" => return extract_Expression_Number (n , source) , "Expression_Neg" => return extract_Expression_Neg (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expression as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::enum_recursive' panicked at src/lib.rs:262:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a3e2e - rust_sitter_macro::tests::enum_recursive::h9e63f68022da147d
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:262:9
[INFO] [stdout]   22:     0x560fa65a2c77 - rust_sitter_macro::tests::enum_recursive::{{closure}}::ha3c5a66dbcf39d5a
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:261:25
[INFO] [stdout]   23:     0x560fa65b69a6 - core::ops::function::FnOnce::call_once::h2e383926ad9001a0
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::enum_transformed_fields stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__enum_transformed_fields.snap
[INFO] [stdout] Snapshot: enum_transformed_fields
[INFO] [stdout] Source: src/lib.rs:242
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub enum Expression
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v | v.parse :: < i32 >
[INFO] [stdout]                                     ().unwrap())] i32),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub enum Expression {
[INFO] [stdout]     2       │-        Number(i32),
[INFO] [stdout]     3       │-    }
[INFO] [stdout]     4       │-    impl rust_sitter::Extract<Expression> for Expression {
[INFO] [stdout]     5       │-        type LeafFn = ();
[INFO] [stdout]     6       │-        #[allow(non_snake_case)]
[INFO] [stdout]     7       │-        fn extract(
[INFO] [stdout]     8       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]     9       │-            source: &[u8],
[INFO] [stdout]    10       │-            _last_idx: usize,
[INFO] [stdout]    11       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    12       │-        ) -> Self {
[INFO] [stdout]    13       │-            let node = node.unwrap();
[INFO] [stdout]    14       │-            #[allow(non_snake_case)]
[INFO] [stdout]    15       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    16       │-            fn extract_Expression_Number_0(
[INFO] [stdout]    17       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    18       │-                source: &[u8],
[INFO] [stdout]    19       │-                last_idx: &mut usize,
[INFO] [stdout]    20       │-            ) -> i32 {
[INFO] [stdout]    21       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    22       │-                    loop {
[INFO] [stdout]    23       │-                        let n = cursor.node();
[INFO] [stdout]    24       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    25       │-                            if name == "0" {
[INFO] [stdout]    26       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    27       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]    28       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    29       │-                                    *cursor_opt = None;
[INFO] [stdout]    30       │-                                };
[INFO] [stdout]    31       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    32       │-                                return out;
[INFO] [stdout]    33       │-                            } else {
[INFO] [stdout]    34       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    35       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]    36       │-                            }
[INFO] [stdout]    37       │-                        } else {
[INFO] [stdout]    38       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    39       │-                        }
[INFO] [stdout]    40       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    41       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    42       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]    43       │-                        }
[INFO] [stdout]    44       │-                    }
[INFO] [stdout]    45       │-                } else {
[INFO] [stdout]    46       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    47       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    48       │-                        node,
[INFO] [stdout]    49       │-                        source,
[INFO] [stdout]    50       │-                        *last_idx,
[INFO] [stdout]    51       │-                        Some(&|v| v.parse::<i32>().unwrap()),
[INFO] [stdout]    52       │-                    );
[INFO] [stdout]    53       │-                }
[INFO] [stdout]    54       │-            }
[INFO] [stdout]    55       │-            #[allow(non_snake_case)]
[INFO] [stdout]    56       │-            fn extract_Expression_Number(
[INFO] [stdout]    57       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    58       │-                source: &[u8],
[INFO] [stdout]    59       │-            ) -> Expression {
[INFO] [stdout]    60       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    61       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    62       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    63       │-                    Some(parent_cursor)
[INFO] [stdout]    64       │-                } else {
[INFO] [stdout]    65       │-                    None
[INFO] [stdout]    66       │-                };
[INFO] [stdout]    67       │-                Expression::Number(extract_Expression_Number_0(
[INFO] [stdout]    68       │-                    &mut cursor,
[INFO] [stdout]    69       │-                    source,
[INFO] [stdout]    70       │-                    &mut last_idx,
[INFO] [stdout]    71       │-                ))
[INFO] [stdout]    72       │-            }
[INFO] [stdout]    73       │-            let mut cursor = node.walk();
[INFO] [stdout]    74       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]    75       │-            loop {
[INFO] [stdout]    76       │-                let n = cursor.node();
[INFO] [stdout]    77       │-                match n.kind() {
[INFO] [stdout]    78       │-                    "Expression_Number" => return extract_Expression_Number(n, source),
[INFO] [stdout]    79       │-                    _ => {
[INFO] [stdout]    80       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    81       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]    82       │-                        }
[INFO] [stdout]    83       │-                    }
[INFO] [stdout]    84       │-                }
[INFO] [stdout]    85       │-            }
[INFO] [stdout]    86       │-        }
[INFO] [stdout]    87       │-    }
[INFO] [stdout]    88       │-    extern "C" {
[INFO] [stdout]    89       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]    90       │-    }
[INFO] [stdout]    91       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]    92       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]    93       │-    }
[INFO] [stdout]    94       │-    pub fn parse(
[INFO] [stdout]    95       │-        input: &str,
[INFO] [stdout]    96       │-    ) -> core::result::Result<Expression, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]    97       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]    98       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]    99       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   100       │-        let root_node = tree.root_node();
[INFO] [stdout]   101       │-        if root_node.has_error() {
[INFO] [stdout]   102       │-            let mut errors = vec![];
[INFO] [stdout]   103       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   104       │-            Err(errors)
[INFO] [stdout]   105       │-        } else {
[INFO] [stdout]   106       │-            use rust_sitter::Extract;
[INFO] [stdout]   107       │-            Ok(<Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   108       │-                Some(root_node),
[INFO] [stdout]   109       │-                input.as_bytes(),
[INFO] [stdout]   110       │-                0,
[INFO] [stdout]   111       │-                None,
[INFO] [stdout]   112       │-            ))
[INFO] [stdout]   113       │-        }
[INFO] [stdout]   114       │-    }
[INFO] [stdout]   115       │-}
[INFO] [stdout]           0 │+mod grammar { pub enum Expression { Number (i32) , } impl rust_sitter :: Extract < Expression > for Expression { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse :: < i32 > () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expression_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Number (extract_Expression_Number_0 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expression_Number" => return extract_Expression_Number (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expression as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::enum_transformed_fields' panicked at src/lib.rs:242:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a2bcf - rust_sitter_macro::tests::enum_transformed_fields::h18a9ef97129cc842
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:242:9
[INFO] [stdout]   22:     0x560fa65a1cf7 - rust_sitter_macro::tests::enum_transformed_fields::{{closure}}::h34fefdf8e18b5e13
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:241:34
[INFO] [stdout]   23:     0x560fa65b6ad6 - core::ops::function::FnOnce::call_once::h70cae8160749478b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::struct_extra stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__struct_extra.snap
[INFO] [stdout] Snapshot: struct_extra
[INFO] [stdout] Source: src/lib.rs:314
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub enum Expression
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] i32,),
[INFO] [stdout]                                 } #[rust_sitter :: extra] struct Whitespace
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter :: leaf(pattern = r"\s")] _whitespace : (),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub enum Expression {
[INFO] [stdout]     2       │-        Number(i32),
[INFO] [stdout]     3       │-    }
[INFO] [stdout]     4       │-    impl rust_sitter::Extract<Expression> for Expression {
[INFO] [stdout]     5       │-        type LeafFn = ();
[INFO] [stdout]     6       │-        #[allow(non_snake_case)]
[INFO] [stdout]     7       │-        fn extract(
[INFO] [stdout]     8       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]     9       │-            source: &[u8],
[INFO] [stdout]    10       │-            _last_idx: usize,
[INFO] [stdout]    11       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    12       │-        ) -> Self {
[INFO] [stdout]    13       │-            let node = node.unwrap();
[INFO] [stdout]    14       │-            #[allow(non_snake_case)]
[INFO] [stdout]    15       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    16       │-            fn extract_Expression_Number_0(
[INFO] [stdout]    17       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    18       │-                source: &[u8],
[INFO] [stdout]    19       │-                last_idx: &mut usize,
[INFO] [stdout]    20       │-            ) -> i32 {
[INFO] [stdout]    21       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    22       │-                    loop {
[INFO] [stdout]    23       │-                        let n = cursor.node();
[INFO] [stdout]    24       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    25       │-                            if name == "0" {
[INFO] [stdout]    26       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    27       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    28       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    29       │-                                    *cursor_opt = None;
[INFO] [stdout]    30       │-                                };
[INFO] [stdout]    31       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    32       │-                                return out;
[INFO] [stdout]    33       │-                            } else {
[INFO] [stdout]    34       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    35       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    36       │-                            }
[INFO] [stdout]    37       │-                        } else {
[INFO] [stdout]    38       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    39       │-                        }
[INFO] [stdout]    40       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    41       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    42       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    43       │-                        }
[INFO] [stdout]    44       │-                    }
[INFO] [stdout]    45       │-                } else {
[INFO] [stdout]    46       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    47       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    48       │-                        node,
[INFO] [stdout]    49       │-                        source,
[INFO] [stdout]    50       │-                        *last_idx,
[INFO] [stdout]    51       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    52       │-                    );
[INFO] [stdout]    53       │-                }
[INFO] [stdout]    54       │-            }
[INFO] [stdout]    55       │-            #[allow(non_snake_case)]
[INFO] [stdout]    56       │-            fn extract_Expression_Number(
[INFO] [stdout]    57       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    58       │-                source: &[u8],
[INFO] [stdout]    59       │-            ) -> Expression {
[INFO] [stdout]    60       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    61       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    62       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    63       │-                    Some(parent_cursor)
[INFO] [stdout]    64       │-                } else {
[INFO] [stdout]    65       │-                    None
[INFO] [stdout]    66       │-                };
[INFO] [stdout]    67       │-                Expression::Number(extract_Expression_Number_0(
[INFO] [stdout]    68       │-                    &mut cursor,
[INFO] [stdout]    69       │-                    source,
[INFO] [stdout]    70       │-                    &mut last_idx,
[INFO] [stdout]    71       │-                ))
[INFO] [stdout]    72       │-            }
[INFO] [stdout]    73       │-            let mut cursor = node.walk();
[INFO] [stdout]    74       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]    75       │-            loop {
[INFO] [stdout]    76       │-                let n = cursor.node();
[INFO] [stdout]    77       │-                match n.kind() {
[INFO] [stdout]    78       │-                    "Expression_Number" => return extract_Expression_Number(n, source),
[INFO] [stdout]    79       │-                    _ => {
[INFO] [stdout]    80       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    81       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]    82       │-                        }
[INFO] [stdout]    83       │-                    }
[INFO] [stdout]    84       │-                }
[INFO] [stdout]    85       │-            }
[INFO] [stdout]    86       │-        }
[INFO] [stdout]    87       │-    }
[INFO] [stdout]    88       │-    struct Whitespace {
[INFO] [stdout]    89       │-        _whitespace: (),
[INFO] [stdout]    90       │-    }
[INFO] [stdout]    91       │-    impl rust_sitter::Extract<Whitespace> for Whitespace {
[INFO] [stdout]    92       │-        type LeafFn = ();
[INFO] [stdout]    93       │-        #[allow(non_snake_case)]
[INFO] [stdout]    94       │-        fn extract(
[INFO] [stdout]    95       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    96       │-            source: &[u8],
[INFO] [stdout]    97       │-            last_idx: usize,
[INFO] [stdout]    98       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    99       │-        ) -> Self {
[INFO] [stdout]   100       │-            let node = node.unwrap();
[INFO] [stdout]   101       │-            #[allow(non_snake_case)]
[INFO] [stdout]   102       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   103       │-            fn extract_Whitespace__whitespace(
[INFO] [stdout]   104       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   105       │-                source: &[u8],
[INFO] [stdout]   106       │-                last_idx: &mut usize,
[INFO] [stdout]   107       │-            ) -> () {
[INFO] [stdout]   108       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   109       │-                    loop {
[INFO] [stdout]   110       │-                        let n = cursor.node();
[INFO] [stdout]   111       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   112       │-                            if name == "_whitespace" {
[INFO] [stdout]   113       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   114       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   115       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   116       │-                                );
[INFO] [stdout]   117       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   118       │-                                    *cursor_opt = None;
[INFO] [stdout]   119       │-                                };
[INFO] [stdout]   120       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   121       │-                                return out;
[INFO] [stdout]   122       │-                            } else {
[INFO] [stdout]   123       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   124       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   125       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   126       │-                                );
[INFO] [stdout]   127       │-                            }
[INFO] [stdout]   128       │-                        } else {
[INFO] [stdout]   129       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   130       │-                        }
[INFO] [stdout]   131       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   132       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   133       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   134       │-                                node, source, *last_idx, None,
[INFO] [stdout]   135       │-                            );
[INFO] [stdout]   136       │-                        }
[INFO] [stdout]   137       │-                    }
[INFO] [stdout]   138       │-                } else {
[INFO] [stdout]   139       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   140       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   141       │-                }
[INFO] [stdout]   142       │-            }
[INFO] [stdout]   143       │-            #[allow(non_snake_case)]
[INFO] [stdout]   144       │-            fn extract_Whitespace(
[INFO] [stdout]   145       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   146       │-                source: &[u8],
[INFO] [stdout]   147       │-            ) -> Whitespace {
[INFO] [stdout]   148       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   149       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   150       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   151       │-                    Some(parent_cursor)
[INFO] [stdout]   152       │-                } else {
[INFO] [stdout]   153       │-                    None
[INFO] [stdout]   154       │-                };
[INFO] [stdout]   155       │-                Whitespace {
[INFO] [stdout]   156       │-                    _whitespace: extract_Whitespace__whitespace(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   157       │-                }
[INFO] [stdout]   158       │-            }
[INFO] [stdout]   159       │-            extract_Whitespace(node, source)
[INFO] [stdout]   160       │-        }
[INFO] [stdout]   161       │-    }
[INFO] [stdout]   162       │-    extern "C" {
[INFO] [stdout]   163       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   164       │-    }
[INFO] [stdout]   165       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   166       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   167       │-    }
[INFO] [stdout]   168       │-    pub fn parse(
[INFO] [stdout]   169       │-        input: &str,
[INFO] [stdout]   170       │-    ) -> core::result::Result<Expression, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   171       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   172       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   173       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   174       │-        let root_node = tree.root_node();
[INFO] [stdout]   175       │-        if root_node.has_error() {
[INFO] [stdout]   176       │-            let mut errors = vec![];
[INFO] [stdout]   177       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   178       │-            Err(errors)
[INFO] [stdout]   179       │-        } else {
[INFO] [stdout]   180       │-            use rust_sitter::Extract;
[INFO] [stdout]   181       │-            Ok(<Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   182       │-                Some(root_node),
[INFO] [stdout]   183       │-                input.as_bytes(),
[INFO] [stdout]   184       │-                0,
[INFO] [stdout]   185       │-                None,
[INFO] [stdout]   186       │-            ))
[INFO] [stdout]   187       │-        }
[INFO] [stdout]   188       │-    }
[INFO] [stdout]   189       │-}
[INFO] [stdout]           0 │+mod grammar { pub enum Expression { Number (i32 ,) , } impl rust_sitter :: Extract < Expression > for Expression { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expression_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Number (extract_Expression_Number_0 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expression_Number" => return extract_Expression_Number (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } struct Whitespace { _whitespace : () , } impl rust_sitter :: Extract < Whitespace > for Whitespace { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Whitespace__whitespace (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "_whitespace" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Whitespace (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Whitespace { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Whitespace { _whitespace : extract_Whitespace__whitespace (& mut cursor , source , & mut last_idx) } } extract_Whitespace (node , source) } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expression as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::struct_extra' panicked at src/lib.rs:314:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a65d9 - rust_sitter_macro::tests::struct_extra::h4add03892f964659
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:314:9
[INFO] [stdout]   22:     0x560fa65a5347 - rust_sitter_macro::tests::struct_extra::{{closure}}::h4f926519f13272e4
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:313:23
[INFO] [stdout]   23:     0x560fa65b6d46 - core::ops::function::FnOnce::call_once::hedd393578c751575
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::enum_with_unamed_vector stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__enum_with_unamed_vector.snap
[INFO] [stdout] Snapshot: enum_with_unamed_vector
[INFO] [stdout] Source: src/lib.rs:415
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 pub struct Number
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] value : u32
[INFO] [stdout]                                 } #[rust_sitter :: language] pub enum Expr
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Numbers(#[rust_sitter :: repeat(non_empty = true)] Vec <
[INFO] [stdout]                                     Number >)
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub struct Number {
[INFO] [stdout]     2       │-        value: u32,
[INFO] [stdout]     3       │-    }
[INFO] [stdout]     4       │-    impl rust_sitter::Extract<Number> for Number {
[INFO] [stdout]     5       │-        type LeafFn = ();
[INFO] [stdout]     6       │-        #[allow(non_snake_case)]
[INFO] [stdout]     7       │-        fn extract(
[INFO] [stdout]     8       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]     9       │-            source: &[u8],
[INFO] [stdout]    10       │-            last_idx: usize,
[INFO] [stdout]    11       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    12       │-        ) -> Self {
[INFO] [stdout]    13       │-            let node = node.unwrap();
[INFO] [stdout]    14       │-            #[allow(non_snake_case)]
[INFO] [stdout]    15       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    16       │-            fn extract_Number_value(
[INFO] [stdout]    17       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    18       │-                source: &[u8],
[INFO] [stdout]    19       │-                last_idx: &mut usize,
[INFO] [stdout]    20       │-            ) -> u32 {
[INFO] [stdout]    21       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    22       │-                    loop {
[INFO] [stdout]    23       │-                        let n = cursor.node();
[INFO] [stdout]    24       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    25       │-                            if name == "value" {
[INFO] [stdout]    26       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    27       │-                                let out = < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    28       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    29       │-                                    *cursor_opt = None;
[INFO] [stdout]    30       │-                                };
[INFO] [stdout]    31       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    32       │-                                return out;
[INFO] [stdout]    33       │-                            } else {
[INFO] [stdout]    34       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    35       │-                                return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    36       │-                            }
[INFO] [stdout]    37       │-                        } else {
[INFO] [stdout]    38       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    39       │-                        }
[INFO] [stdout]    40       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    41       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    42       │-                            return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    43       │-                        }
[INFO] [stdout]    44       │-                    }
[INFO] [stdout]    45       │-                } else {
[INFO] [stdout]    46       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    47       │-                    return <rust_sitter::WithLeaf<u32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    48       │-                        node,
[INFO] [stdout]    49       │-                        source,
[INFO] [stdout]    50       │-                        *last_idx,
[INFO] [stdout]    51       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    52       │-                    );
[INFO] [stdout]    53       │-                }
[INFO] [stdout]    54       │-            }
[INFO] [stdout]    55       │-            #[allow(non_snake_case)]
[INFO] [stdout]    56       │-            fn extract_Number(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Number {
[INFO] [stdout]    57       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    58       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    59       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    60       │-                    Some(parent_cursor)
[INFO] [stdout]    61       │-                } else {
[INFO] [stdout]    62       │-                    None
[INFO] [stdout]    63       │-                };
[INFO] [stdout]    64       │-                Number {
[INFO] [stdout]    65       │-                    value: extract_Number_value(&mut cursor, source, &mut last_idx),
[INFO] [stdout]    66       │-                }
[INFO] [stdout]    67       │-            }
[INFO] [stdout]    68       │-            extract_Number(node, source)
[INFO] [stdout]    69       │-        }
[INFO] [stdout]    70       │-    }
[INFO] [stdout]    71       │-    pub enum Expr {
[INFO] [stdout]    72       │-        Numbers(Vec<Number>),
[INFO] [stdout]    73       │-    }
[INFO] [stdout]    74       │-    impl rust_sitter::Extract<Expr> for Expr {
[INFO] [stdout]    75       │-        type LeafFn = ();
[INFO] [stdout]    76       │-        #[allow(non_snake_case)]
[INFO] [stdout]    77       │-        fn extract(
[INFO] [stdout]    78       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    79       │-            source: &[u8],
[INFO] [stdout]    80       │-            _last_idx: usize,
[INFO] [stdout]    81       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    82       │-        ) -> Self {
[INFO] [stdout]    83       │-            let node = node.unwrap();
[INFO] [stdout]    84       │-            #[allow(non_snake_case)]
[INFO] [stdout]    85       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    86       │-            fn extract_Expr_Numbers_0(
[INFO] [stdout]    87       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    88       │-                source: &[u8],
[INFO] [stdout]    89       │-                last_idx: &mut usize,
[INFO] [stdout]    90       │-            ) -> Vec<Number> {
[INFO] [stdout]    91       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    92       │-                    loop {
[INFO] [stdout]    93       │-                        let n = cursor.node();
[INFO] [stdout]    94       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    95       │-                            if name == "0" {
[INFO] [stdout]    96       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    97       │-                                let out = <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    98       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    99       │-                                );
[INFO] [stdout]   100       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   101       │-                                    *cursor_opt = None;
[INFO] [stdout]   102       │-                                };
[INFO] [stdout]   103       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   104       │-                                return out;
[INFO] [stdout]   105       │-                            } else {
[INFO] [stdout]   106       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   107       │-                                return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   108       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   109       │-                                );
[INFO] [stdout]   110       │-                            }
[INFO] [stdout]   111       │-                        } else {
[INFO] [stdout]   112       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   113       │-                        }
[INFO] [stdout]   114       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   115       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   116       │-                            return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   117       │-                                node, source, *last_idx, None,
[INFO] [stdout]   118       │-                            );
[INFO] [stdout]   119       │-                        }
[INFO] [stdout]   120       │-                    }
[INFO] [stdout]   121       │-                } else {
[INFO] [stdout]   122       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   123       │-                    return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   124       │-                        node, source, *last_idx, None,
[INFO] [stdout]   125       │-                    );
[INFO] [stdout]   126       │-                }
[INFO] [stdout]   127       │-            }
[INFO] [stdout]   128       │-            #[allow(non_snake_case)]
[INFO] [stdout]   129       │-            fn extract_Expr_Numbers(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Expr {
[INFO] [stdout]   130       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   131       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   132       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   133       │-                    Some(parent_cursor)
[INFO] [stdout]   134       │-                } else {
[INFO] [stdout]   135       │-                    None
[INFO] [stdout]   136       │-                };
[INFO] [stdout]   137       │-                Expr::Numbers(extract_Expr_Numbers_0(&mut cursor, source, &mut last_idx))
[INFO] [stdout]   138       │-            }
[INFO] [stdout]   139       │-            let mut cursor = node.walk();
[INFO] [stdout]   140       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]   141       │-            loop {
[INFO] [stdout]   142       │-                let n = cursor.node();
[INFO] [stdout]   143       │-                match n.kind() {
[INFO] [stdout]   144       │-                    "Expr_Numbers" => return extract_Expr_Numbers(n, source),
[INFO] [stdout]   145       │-                    _ => {
[INFO] [stdout]   146       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   147       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]   148       │-                        }
[INFO] [stdout]   149       │-                    }
[INFO] [stdout]   150       │-                }
[INFO] [stdout]   151       │-            }
[INFO] [stdout]   152       │-        }
[INFO] [stdout]   153       │-    }
[INFO] [stdout]   154       │-    extern "C" {
[INFO] [stdout]   155       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   156       │-    }
[INFO] [stdout]   157       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   158       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   159       │-    }
[INFO] [stdout]   160       │-    pub fn parse(input: &str) -> core::result::Result<Expr, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   161       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   162       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   163       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   164       │-        let root_node = tree.root_node();
[INFO] [stdout]   165       │-        if root_node.has_error() {
[INFO] [stdout]   166       │-            let mut errors = vec![];
[INFO] [stdout]   167       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   168       │-            Err(errors)
[INFO] [stdout]   169       │-        } else {
[INFO] [stdout]   170       │-            use rust_sitter::Extract;
[INFO] [stdout]   171       │-            Ok(<Expr as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   172       │-                Some(root_node),
[INFO] [stdout]   173       │-                input.as_bytes(),
[INFO] [stdout]   174       │-                0,
[INFO] [stdout]   175       │-                None,
[INFO] [stdout]   176       │-            ))
[INFO] [stdout]   177       │-        }
[INFO] [stdout]   178       │-    }
[INFO] [stdout]   179       │-}
[INFO] [stdout]           0 │+mod grammar { pub struct Number { value : u32 } impl rust_sitter :: Extract < Number > for Number { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Number_value (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> u32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "value" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < u32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Number { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Number { value : extract_Number_value (& mut cursor , source , & mut last_idx) } } extract_Number (node , source) } } pub enum Expr { Numbers (Vec < Number >) } impl rust_sitter :: Extract < Expr > for Expr { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expr_Numbers_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Vec < Number > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Expr_Numbers (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expr { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expr :: Numbers (extract_Expr_Numbers_0 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expr_Numbers" => return extract_Expr_Numbers (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Expr , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Expr as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::enum_with_unamed_vector' panicked at src/lib.rs:415:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65ab18a - rust_sitter_macro::tests::enum_with_unamed_vector::hbb89b130a70fb6bb
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:415:9
[INFO] [stdout]   22:     0x560fa65a9fd7 - rust_sitter_macro::tests::enum_with_unamed_vector::{{closure}}::hb64f57f6f8a6627b
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:414:34
[INFO] [stdout]   23:     0x560fa65b6b96 - core::ops::function::FnOnce::call_once::h8992eae8d6e02cf2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::spanned_in_vec stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__spanned_in_vec.snap
[INFO] [stdout] Snapshot: spanned_in_vec
[INFO] [stdout] Source: src/lib.rs:465
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 use rust_sitter :: Spanned ; #[rust_sitter :: language] pub
[INFO] [stdout]                                 struct NumberList { numbers : Vec < Spanned < Number >>, }
[INFO] [stdout]                                 pub struct Number
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] v : i32
[INFO] [stdout]                                 } #[rust_sitter :: extra] struct Whitespace
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter :: leaf(pattern = r"\s")] _whitespace : (),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    use rust_sitter::Spanned;
[INFO] [stdout]     2       │-    pub struct NumberList {
[INFO] [stdout]     3       │-        numbers: Vec<Spanned<Number>>,
[INFO] [stdout]     4       │-    }
[INFO] [stdout]     5       │-    impl rust_sitter::Extract<NumberList> for NumberList {
[INFO] [stdout]     6       │-        type LeafFn = ();
[INFO] [stdout]     7       │-        #[allow(non_snake_case)]
[INFO] [stdout]     8       │-        fn extract(
[INFO] [stdout]     9       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    10       │-            source: &[u8],
[INFO] [stdout]    11       │-            last_idx: usize,
[INFO] [stdout]    12       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    13       │-        ) -> Self {
[INFO] [stdout]    14       │-            let node = node.unwrap();
[INFO] [stdout]    15       │-            #[allow(non_snake_case)]
[INFO] [stdout]    16       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    17       │-            fn extract_NumberList_numbers(
[INFO] [stdout]    18       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    19       │-                source: &[u8],
[INFO] [stdout]    20       │-                last_idx: &mut usize,
[INFO] [stdout]    21       │-            ) -> Vec<Spanned<Number>> {
[INFO] [stdout]    22       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    23       │-                    loop {
[INFO] [stdout]    24       │-                        let n = cursor.node();
[INFO] [stdout]    25       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    26       │-                            if name == "numbers" {
[INFO] [stdout]    27       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    28       │-                                let out =
[INFO] [stdout]    29       │-                                    <Vec<Spanned<Number>> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    30       │-                                        node, source, *last_idx, None,
[INFO] [stdout]    31       │-                                    );
[INFO] [stdout]    32       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    33       │-                                    *cursor_opt = None;
[INFO] [stdout]    34       │-                                };
[INFO] [stdout]    35       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    36       │-                                return out;
[INFO] [stdout]    37       │-                            } else {
[INFO] [stdout]    38       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    39       │-                                return <Vec<Spanned<Number>> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    40       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    41       │-                                );
[INFO] [stdout]    42       │-                            }
[INFO] [stdout]    43       │-                        } else {
[INFO] [stdout]    44       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    45       │-                        }
[INFO] [stdout]    46       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    47       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    48       │-                            return <Vec<Spanned<Number>> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    49       │-                                node, source, *last_idx, None,
[INFO] [stdout]    50       │-                            );
[INFO] [stdout]    51       │-                        }
[INFO] [stdout]    52       │-                    }
[INFO] [stdout]    53       │-                } else {
[INFO] [stdout]    54       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    55       │-                    return <Vec<Spanned<Number>> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    56       │-                        node, source, *last_idx, None,
[INFO] [stdout]    57       │-                    );
[INFO] [stdout]    58       │-                }
[INFO] [stdout]    59       │-            }
[INFO] [stdout]    60       │-            #[allow(non_snake_case)]
[INFO] [stdout]    61       │-            fn extract_NumberList(
[INFO] [stdout]    62       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    63       │-                source: &[u8],
[INFO] [stdout]    64       │-            ) -> NumberList {
[INFO] [stdout]    65       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    66       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    67       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    68       │-                    Some(parent_cursor)
[INFO] [stdout]    69       │-                } else {
[INFO] [stdout]    70       │-                    None
[INFO] [stdout]    71       │-                };
[INFO] [stdout]    72       │-                NumberList {
[INFO] [stdout]    73       │-                    numbers: extract_NumberList_numbers(&mut cursor, source, &mut last_idx),
[INFO] [stdout]    74       │-                }
[INFO] [stdout]    75       │-            }
[INFO] [stdout]    76       │-            extract_NumberList(node, source)
[INFO] [stdout]    77       │-        }
[INFO] [stdout]    78       │-    }
[INFO] [stdout]    79       │-    pub struct Number {
[INFO] [stdout]    80       │-        v: i32,
[INFO] [stdout]    81       │-    }
[INFO] [stdout]    82       │-    impl rust_sitter::Extract<Number> for Number {
[INFO] [stdout]    83       │-        type LeafFn = ();
[INFO] [stdout]    84       │-        #[allow(non_snake_case)]
[INFO] [stdout]    85       │-        fn extract(
[INFO] [stdout]    86       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    87       │-            source: &[u8],
[INFO] [stdout]    88       │-            last_idx: usize,
[INFO] [stdout]    89       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    90       │-        ) -> Self {
[INFO] [stdout]    91       │-            let node = node.unwrap();
[INFO] [stdout]    92       │-            #[allow(non_snake_case)]
[INFO] [stdout]    93       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    94       │-            fn extract_Number_v(
[INFO] [stdout]    95       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    96       │-                source: &[u8],
[INFO] [stdout]    97       │-                last_idx: &mut usize,
[INFO] [stdout]    98       │-            ) -> i32 {
[INFO] [stdout]    99       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   100       │-                    loop {
[INFO] [stdout]   101       │-                        let n = cursor.node();
[INFO] [stdout]   102       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   103       │-                            if name == "v" {
[INFO] [stdout]   104       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   105       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   106       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   107       │-                                    *cursor_opt = None;
[INFO] [stdout]   108       │-                                };
[INFO] [stdout]   109       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   110       │-                                return out;
[INFO] [stdout]   111       │-                            } else {
[INFO] [stdout]   112       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   113       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   114       │-                            }
[INFO] [stdout]   115       │-                        } else {
[INFO] [stdout]   116       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   117       │-                        }
[INFO] [stdout]   118       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   119       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   120       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   121       │-                        }
[INFO] [stdout]   122       │-                    }
[INFO] [stdout]   123       │-                } else {
[INFO] [stdout]   124       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   125       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   126       │-                        node,
[INFO] [stdout]   127       │-                        source,
[INFO] [stdout]   128       │-                        *last_idx,
[INFO] [stdout]   129       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]   130       │-                    );
[INFO] [stdout]   131       │-                }
[INFO] [stdout]   132       │-            }
[INFO] [stdout]   133       │-            #[allow(non_snake_case)]
[INFO] [stdout]   134       │-            fn extract_Number(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Number {
[INFO] [stdout]   135       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   136       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   137       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   138       │-                    Some(parent_cursor)
[INFO] [stdout]   139       │-                } else {
[INFO] [stdout]   140       │-                    None
[INFO] [stdout]   141       │-                };
[INFO] [stdout]   142       │-                Number {
[INFO] [stdout]   143       │-                    v: extract_Number_v(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   144       │-                }
[INFO] [stdout]   145       │-            }
[INFO] [stdout]   146       │-            extract_Number(node, source)
[INFO] [stdout]   147       │-        }
[INFO] [stdout]   148       │-    }
[INFO] [stdout]   149       │-    struct Whitespace {
[INFO] [stdout]   150       │-        _whitespace: (),
[INFO] [stdout]   151       │-    }
[INFO] [stdout]   152       │-    impl rust_sitter::Extract<Whitespace> for Whitespace {
[INFO] [stdout]   153       │-        type LeafFn = ();
[INFO] [stdout]   154       │-        #[allow(non_snake_case)]
[INFO] [stdout]   155       │-        fn extract(
[INFO] [stdout]   156       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]   157       │-            source: &[u8],
[INFO] [stdout]   158       │-            last_idx: usize,
[INFO] [stdout]   159       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]   160       │-        ) -> Self {
[INFO] [stdout]   161       │-            let node = node.unwrap();
[INFO] [stdout]   162       │-            #[allow(non_snake_case)]
[INFO] [stdout]   163       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   164       │-            fn extract_Whitespace__whitespace(
[INFO] [stdout]   165       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   166       │-                source: &[u8],
[INFO] [stdout]   167       │-                last_idx: &mut usize,
[INFO] [stdout]   168       │-            ) -> () {
[INFO] [stdout]   169       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   170       │-                    loop {
[INFO] [stdout]   171       │-                        let n = cursor.node();
[INFO] [stdout]   172       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   173       │-                            if name == "_whitespace" {
[INFO] [stdout]   174       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   175       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   176       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   177       │-                                );
[INFO] [stdout]   178       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   179       │-                                    *cursor_opt = None;
[INFO] [stdout]   180       │-                                };
[INFO] [stdout]   181       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   182       │-                                return out;
[INFO] [stdout]   183       │-                            } else {
[INFO] [stdout]   184       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   185       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   186       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   187       │-                                );
[INFO] [stdout]   188       │-                            }
[INFO] [stdout]   189       │-                        } else {
[INFO] [stdout]   190       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   191       │-                        }
[INFO] [stdout]   192       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   193       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   194       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   195       │-                                node, source, *last_idx, None,
[INFO] [stdout]   196       │-                            );
[INFO] [stdout]   197       │-                        }
[INFO] [stdout]   198       │-                    }
[INFO] [stdout]   199       │-                } else {
[INFO] [stdout]   200       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   201       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   202       │-                }
[INFO] [stdout]   203       │-            }
[INFO] [stdout]   204       │-            #[allow(non_snake_case)]
[INFO] [stdout]   205       │-            fn extract_Whitespace(
[INFO] [stdout]   206       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   207       │-                source: &[u8],
[INFO] [stdout]   208       │-            ) -> Whitespace {
[INFO] [stdout]   209       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   210       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   211       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   212       │-                    Some(parent_cursor)
[INFO] [stdout]   213       │-                } else {
[INFO] [stdout]   214       │-                    None
[INFO] [stdout]   215       │-                };
[INFO] [stdout]   216       │-                Whitespace {
[INFO] [stdout]   217       │-                    _whitespace: extract_Whitespace__whitespace(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   218       │-                }
[INFO] [stdout]   219       │-            }
[INFO] [stdout]   220       │-            extract_Whitespace(node, source)
[INFO] [stdout]   221       │-        }
[INFO] [stdout]   222       │-    }
[INFO] [stdout]   223       │-    extern "C" {
[INFO] [stdout]   224       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   225       │-    }
[INFO] [stdout]   226       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   227       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   228       │-    }
[INFO] [stdout]   229       │-    pub fn parse(
[INFO] [stdout]   230       │-        input: &str,
[INFO] [stdout]   231       │-    ) -> core::result::Result<NumberList, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   232       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   233       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   234       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   235       │-        let root_node = tree.root_node();
[INFO] [stdout]   236       │-        if root_node.has_error() {
[INFO] [stdout]   237       │-            let mut errors = vec![];
[INFO] [stdout]   238       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   239       │-            Err(errors)
[INFO] [stdout]   240       │-        } else {
[INFO] [stdout]   241       │-            use rust_sitter::Extract;
[INFO] [stdout]   242       │-            Ok(<NumberList as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   243       │-                Some(root_node),
[INFO] [stdout]   244       │-                input.as_bytes(),
[INFO] [stdout]   245       │-                0,
[INFO] [stdout]   246       │-                None,
[INFO] [stdout]   247       │-            ))
[INFO] [stdout]   248       │-        }
[INFO] [stdout]   249       │-    }
[INFO] [stdout]   250       │-}
[INFO] [stdout]           0 │+mod grammar { use rust_sitter :: Spanned ; pub struct NumberList { numbers : Vec < Spanned < Number > > , } impl rust_sitter :: Extract < NumberList > for NumberList { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_NumberList_numbers (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Vec < Spanned < Number > > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "numbers" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Vec < Spanned < Number > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Spanned < Number > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Spanned < Number > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Spanned < Number > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_NumberList (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> NumberList { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; NumberList { numbers : extract_NumberList_numbers (& mut cursor , source , & mut last_idx) } } extract_NumberList (node , source) } } pub struct Number { v : i32 } impl rust_sitter :: Extract < Number > for Number { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Number_v (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "v" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Number { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Number { v : extract_Number_v (& mut cursor , source , & mut last_idx) } } extract_Number (node , source) } } struct Whitespace { _whitespace : () , } impl rust_sitter :: Extract < Whitespace > for Whitespace { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Whitespace__whitespace (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "_whitespace" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Whitespace (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Whitespace { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Whitespace { _whitespace : extract_Whitespace__whitespace (& mut cursor , source , & mut last_idx) } } extract_Whitespace (node , source) } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < NumberList , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< NumberList as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::spanned_in_vec' panicked at src/lib.rs:465:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65ad927 - rust_sitter_macro::tests::spanned_in_vec::hf8b77fa9095ca430
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:465:9
[INFO] [stdout]   22:     0x560fa65ac4e7 - rust_sitter_macro::tests::spanned_in_vec::{{closure}}::h3265c8f4e2964983
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:464:25
[INFO] [stdout]   23:     0x560fa65b68c6 - core::ops::function::FnOnce::call_once::h07fcbda4206f7975
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::grammar_unboxed_field stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__grammar_unboxed_field.snap
[INFO] [stdout] Snapshot: grammar_unboxed_field
[INFO] [stdout] Source: src/lib.rs:339
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub struct Language
[INFO] [stdout]                                 { e : Expression, } pub enum Expression
[INFO] [stdout]                                 {
[INFO] [stdout]                                     Number(#[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v : & str | v.parse ::
[INFO] [stdout]                                     < i32 > ().unwrap())] i32),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub struct Language {
[INFO] [stdout]     2       │-        e: Expression,
[INFO] [stdout]     3       │-    }
[INFO] [stdout]     4       │-    impl rust_sitter::Extract<Language> for Language {
[INFO] [stdout]     5       │-        type LeafFn = ();
[INFO] [stdout]     6       │-        #[allow(non_snake_case)]
[INFO] [stdout]     7       │-        fn extract(
[INFO] [stdout]     8       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]     9       │-            source: &[u8],
[INFO] [stdout]    10       │-            last_idx: usize,
[INFO] [stdout]    11       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    12       │-        ) -> Self {
[INFO] [stdout]    13       │-            let node = node.unwrap();
[INFO] [stdout]    14       │-            #[allow(non_snake_case)]
[INFO] [stdout]    15       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    16       │-            fn extract_Language_e(
[INFO] [stdout]    17       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    18       │-                source: &[u8],
[INFO] [stdout]    19       │-                last_idx: &mut usize,
[INFO] [stdout]    20       │-            ) -> Expression {
[INFO] [stdout]    21       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    22       │-                    loop {
[INFO] [stdout]    23       │-                        let n = cursor.node();
[INFO] [stdout]    24       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    25       │-                            if name == "e" {
[INFO] [stdout]    26       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    27       │-                                let out = <Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    28       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    29       │-                                );
[INFO] [stdout]    30       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    31       │-                                    *cursor_opt = None;
[INFO] [stdout]    32       │-                                };
[INFO] [stdout]    33       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    34       │-                                return out;
[INFO] [stdout]    35       │-                            } else {
[INFO] [stdout]    36       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    37       │-                                return <Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    38       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    39       │-                                );
[INFO] [stdout]    40       │-                            }
[INFO] [stdout]    41       │-                        } else {
[INFO] [stdout]    42       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    43       │-                        }
[INFO] [stdout]    44       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    45       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    46       │-                            return <Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    47       │-                                node, source, *last_idx, None,
[INFO] [stdout]    48       │-                            );
[INFO] [stdout]    49       │-                        }
[INFO] [stdout]    50       │-                    }
[INFO] [stdout]    51       │-                } else {
[INFO] [stdout]    52       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    53       │-                    return <Expression as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    54       │-                        node, source, *last_idx, None,
[INFO] [stdout]    55       │-                    );
[INFO] [stdout]    56       │-                }
[INFO] [stdout]    57       │-            }
[INFO] [stdout]    58       │-            #[allow(non_snake_case)]
[INFO] [stdout]    59       │-            fn extract_Language(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Language {
[INFO] [stdout]    60       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    61       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    62       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    63       │-                    Some(parent_cursor)
[INFO] [stdout]    64       │-                } else {
[INFO] [stdout]    65       │-                    None
[INFO] [stdout]    66       │-                };
[INFO] [stdout]    67       │-                Language {
[INFO] [stdout]    68       │-                    e: extract_Language_e(&mut cursor, source, &mut last_idx),
[INFO] [stdout]    69       │-                }
[INFO] [stdout]    70       │-            }
[INFO] [stdout]    71       │-            extract_Language(node, source)
[INFO] [stdout]    72       │-        }
[INFO] [stdout]    73       │-    }
[INFO] [stdout]    74       │-    pub enum Expression {
[INFO] [stdout]    75       │-        Number(i32),
[INFO] [stdout]    76       │-    }
[INFO] [stdout]    77       │-    impl rust_sitter::Extract<Expression> for Expression {
[INFO] [stdout]    78       │-        type LeafFn = ();
[INFO] [stdout]    79       │-        #[allow(non_snake_case)]
[INFO] [stdout]    80       │-        fn extract(
[INFO] [stdout]    81       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    82       │-            source: &[u8],
[INFO] [stdout]    83       │-            _last_idx: usize,
[INFO] [stdout]    84       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    85       │-        ) -> Self {
[INFO] [stdout]    86       │-            let node = node.unwrap();
[INFO] [stdout]    87       │-            #[allow(non_snake_case)]
[INFO] [stdout]    88       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    89       │-            fn extract_Expression_Number_0(
[INFO] [stdout]    90       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    91       │-                source: &[u8],
[INFO] [stdout]    92       │-                last_idx: &mut usize,
[INFO] [stdout]    93       │-            ) -> i32 {
[INFO] [stdout]    94       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    95       │-                    loop {
[INFO] [stdout]    96       │-                        let n = cursor.node();
[INFO] [stdout]    97       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    98       │-                            if name == "0" {
[INFO] [stdout]    99       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   100       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]   101       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   102       │-                                    *cursor_opt = None;
[INFO] [stdout]   103       │-                                };
[INFO] [stdout]   104       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   105       │-                                return out;
[INFO] [stdout]   106       │-                            } else {
[INFO] [stdout]   107       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   108       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]   109       │-                            }
[INFO] [stdout]   110       │-                        } else {
[INFO] [stdout]   111       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   112       │-                        }
[INFO] [stdout]   113       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   114       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   115       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ;
[INFO] [stdout]   116       │-                        }
[INFO] [stdout]   117       │-                    }
[INFO] [stdout]   118       │-                } else {
[INFO] [stdout]   119       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   120       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   121       │-                        node,
[INFO] [stdout]   122       │-                        source,
[INFO] [stdout]   123       │-                        *last_idx,
[INFO] [stdout]   124       │-                        Some(&|v: &str| v.parse::<i32>().unwrap()),
[INFO] [stdout]   125       │-                    );
[INFO] [stdout]   126       │-                }
[INFO] [stdout]   127       │-            }
[INFO] [stdout]   128       │-            #[allow(non_snake_case)]
[INFO] [stdout]   129       │-            fn extract_Expression_Number(
[INFO] [stdout]   130       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   131       │-                source: &[u8],
[INFO] [stdout]   132       │-            ) -> Expression {
[INFO] [stdout]   133       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   134       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   135       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   136       │-                    Some(parent_cursor)
[INFO] [stdout]   137       │-                } else {
[INFO] [stdout]   138       │-                    None
[INFO] [stdout]   139       │-                };
[INFO] [stdout]   140       │-                Expression::Number(extract_Expression_Number_0(
[INFO] [stdout]   141       │-                    &mut cursor,
[INFO] [stdout]   142       │-                    source,
[INFO] [stdout]   143       │-                    &mut last_idx,
[INFO] [stdout]   144       │-                ))
[INFO] [stdout]   145       │-            }
[INFO] [stdout]   146       │-            let mut cursor = node.walk();
[INFO] [stdout]   147       │-            assert!(cursor.goto_first_child());
[INFO] [stdout]   148       │-            loop {
[INFO] [stdout]   149       │-                let n = cursor.node();
[INFO] [stdout]   150       │-                match n.kind() {
[INFO] [stdout]   151       │-                    "Expression_Number" => return extract_Expression_Number(n, source),
[INFO] [stdout]   152       │-                    _ => {
[INFO] [stdout]   153       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   154       │-                            panic!("Could not find a child corresponding to any enum branch")
[INFO] [stdout]   155       │-                        }
[INFO] [stdout]   156       │-                    }
[INFO] [stdout]   157       │-                }
[INFO] [stdout]   158       │-            }
[INFO] [stdout]   159       │-        }
[INFO] [stdout]   160       │-    }
[INFO] [stdout]   161       │-    extern "C" {
[INFO] [stdout]   162       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   163       │-    }
[INFO] [stdout]   164       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   165       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   166       │-    }
[INFO] [stdout]   167       │-    pub fn parse(
[INFO] [stdout]   168       │-        input: &str,
[INFO] [stdout]   169       │-    ) -> core::result::Result<Language, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   170       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   171       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   172       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   173       │-        let root_node = tree.root_node();
[INFO] [stdout]   174       │-        if root_node.has_error() {
[INFO] [stdout]   175       │-            let mut errors = vec![];
[INFO] [stdout]   176       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   177       │-            Err(errors)
[INFO] [stdout]   178       │-        } else {
[INFO] [stdout]   179       │-            use rust_sitter::Extract;
[INFO] [stdout]   180       │-            Ok(<Language as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   181       │-                Some(root_node),
[INFO] [stdout]   182       │-                input.as_bytes(),
[INFO] [stdout]   183       │-                0,
[INFO] [stdout]   184       │-                None,
[INFO] [stdout]   185       │-            ))
[INFO] [stdout]   186       │-        }
[INFO] [stdout]   187       │-    }
[INFO] [stdout]   188       │-}
[INFO] [stdout]           0 │+mod grammar { pub struct Language { e : Expression , } impl rust_sitter :: Extract < Language > for Language { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Language_e (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Expression { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "e" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Expression as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Expression as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Expression as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Expression as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Language (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Language { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Language { e : extract_Language_e (& mut cursor , source , & mut last_idx) } } extract_Language (node , source) } } pub enum Expression { Number (i32) , } impl rust_sitter :: Extract < Expression > for Expression { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , _last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Expression_Number_0 (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "0" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Expression_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Expression { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Expression :: Number (extract_Expression_Number_0 (& mut cursor , source , & mut last_idx)) } let mut cursor = node . walk () ; assert ! (cursor . goto_first_child ()) ; loop { let n = cursor . node () ; match n . kind () { "Expression_Number" => return extract_Expression_Number (n , source) , _ => if ! cursor . goto_next_sibling () { panic ! ("Could not find a child corresponding to any enum branch") } } } } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Language , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Language as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::grammar_unboxed_field' panicked at src/lib.rs:339:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a76df - rust_sitter_macro::tests::grammar_unboxed_field::h532e83ba0879e325
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:339:9
[INFO] [stdout]   22:     0x560fa65a6677 - rust_sitter_macro::tests::grammar_unboxed_field::{{closure}}::ha9ee16dafec701e7
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:338:32
[INFO] [stdout]   23:     0x560fa65b6936 - core::ops::function::FnOnce::call_once::h0d6b91fd4d6725c9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::struct_optional stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__struct_optional.snap
[INFO] [stdout] Snapshot: struct_optional
[INFO] [stdout] Source: src/lib.rs:391
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub struct Language
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] v : Option < i32 >, t : Option < Number
[INFO] [stdout]                                     >,
[INFO] [stdout]                                 } pub struct Number
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] v : i32
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub struct Language {
[INFO] [stdout]     2       │-        v: Option<i32>,
[INFO] [stdout]     3       │-        t: Option<Number>,
[INFO] [stdout]     4       │-    }
[INFO] [stdout]     5       │-    impl rust_sitter::Extract<Language> for Language {
[INFO] [stdout]     6       │-        type LeafFn = ();
[INFO] [stdout]     7       │-        #[allow(non_snake_case)]
[INFO] [stdout]     8       │-        fn extract(
[INFO] [stdout]     9       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    10       │-            source: &[u8],
[INFO] [stdout]    11       │-            last_idx: usize,
[INFO] [stdout]    12       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    13       │-        ) -> Self {
[INFO] [stdout]    14       │-            let node = node.unwrap();
[INFO] [stdout]    15       │-            #[allow(non_snake_case)]
[INFO] [stdout]    16       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    17       │-            fn extract_Language_v(
[INFO] [stdout]    18       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    19       │-                source: &[u8],
[INFO] [stdout]    20       │-                last_idx: &mut usize,
[INFO] [stdout]    21       │-            ) -> Option<i32> {
[INFO] [stdout]    22       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    23       │-                    loop {
[INFO] [stdout]    24       │-                        let n = cursor.node();
[INFO] [stdout]    25       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    26       │-                            if name == "v" {
[INFO] [stdout]    27       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    28       │-                                let out =
[INFO] [stdout]    29       │-                                    <Option<rust_sitter::WithLeaf<i32>> as rust_sitter::Extract<
[INFO] [stdout]    30       │-                                        _,
[INFO] [stdout]    31       │-                                    >>::extract(
[INFO] [stdout]    32       │-                                        node,
[INFO] [stdout]    33       │-                                        source,
[INFO] [stdout]    34       │-                                        *last_idx,
[INFO] [stdout]    35       │-                                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]    36       │-                                    );
[INFO] [stdout]    37       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    38       │-                                    *cursor_opt = None;
[INFO] [stdout]    39       │-                                };
[INFO] [stdout]    40       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    41       │-                                return out;
[INFO] [stdout]    42       │-                            } else {
[INFO] [stdout]    43       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    44       │-                                return < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    45       │-                            }
[INFO] [stdout]    46       │-                        } else {
[INFO] [stdout]    47       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    48       │-                        }
[INFO] [stdout]    49       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    50       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    51       │-                            return <Option<rust_sitter::WithLeaf<i32>> as rust_sitter::Extract<
[INFO] [stdout]    52       │-                                _,
[INFO] [stdout]    53       │-                            >>::extract(
[INFO] [stdout]    54       │-                                node, source, *last_idx, Some(&|v| v.parse().unwrap())
[INFO] [stdout]    55       │-                            );
[INFO] [stdout]    56       │-                        }
[INFO] [stdout]    57       │-                    }
[INFO] [stdout]    58       │-                } else {
[INFO] [stdout]    59       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    60       │-                    return < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]    61       │-                }
[INFO] [stdout]    62       │-            }
[INFO] [stdout]    63       │-            #[allow(non_snake_case)]
[INFO] [stdout]    64       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    65       │-            fn extract_Language_t(
[INFO] [stdout]    66       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    67       │-                source: &[u8],
[INFO] [stdout]    68       │-                last_idx: &mut usize,
[INFO] [stdout]    69       │-            ) -> Option<Number> {
[INFO] [stdout]    70       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    71       │-                    loop {
[INFO] [stdout]    72       │-                        let n = cursor.node();
[INFO] [stdout]    73       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    74       │-                            if name == "t" {
[INFO] [stdout]    75       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    76       │-                                let out = <Option<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    77       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    78       │-                                );
[INFO] [stdout]    79       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    80       │-                                    *cursor_opt = None;
[INFO] [stdout]    81       │-                                };
[INFO] [stdout]    82       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    83       │-                                return out;
[INFO] [stdout]    84       │-                            } else {
[INFO] [stdout]    85       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    86       │-                                return <Option<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    87       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    88       │-                                );
[INFO] [stdout]    89       │-                            }
[INFO] [stdout]    90       │-                        } else {
[INFO] [stdout]    91       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    92       │-                        }
[INFO] [stdout]    93       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    94       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    95       │-                            return <Option<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    96       │-                                node, source, *last_idx, None,
[INFO] [stdout]    97       │-                            );
[INFO] [stdout]    98       │-                        }
[INFO] [stdout]    99       │-                    }
[INFO] [stdout]   100       │-                } else {
[INFO] [stdout]   101       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   102       │-                    return <Option<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   103       │-                        node, source, *last_idx, None,
[INFO] [stdout]   104       │-                    );
[INFO] [stdout]   105       │-                }
[INFO] [stdout]   106       │-            }
[INFO] [stdout]   107       │-            #[allow(non_snake_case)]
[INFO] [stdout]   108       │-            fn extract_Language(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Language {
[INFO] [stdout]   109       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   110       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   111       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   112       │-                    Some(parent_cursor)
[INFO] [stdout]   113       │-                } else {
[INFO] [stdout]   114       │-                    None
[INFO] [stdout]   115       │-                };
[INFO] [stdout]   116       │-                Language {
[INFO] [stdout]   117       │-                    v: extract_Language_v(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   118       │-                    t: extract_Language_t(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   119       │-                }
[INFO] [stdout]   120       │-            }
[INFO] [stdout]   121       │-            extract_Language(node, source)
[INFO] [stdout]   122       │-        }
[INFO] [stdout]   123       │-    }
[INFO] [stdout]   124       │-    pub struct Number {
[INFO] [stdout]   125       │-        v: i32,
[INFO] [stdout]   126       │-    }
[INFO] [stdout]   127       │-    impl rust_sitter::Extract<Number> for Number {
[INFO] [stdout]   128       │-        type LeafFn = ();
[INFO] [stdout]   129       │-        #[allow(non_snake_case)]
[INFO] [stdout]   130       │-        fn extract(
[INFO] [stdout]   131       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]   132       │-            source: &[u8],
[INFO] [stdout]   133       │-            last_idx: usize,
[INFO] [stdout]   134       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]   135       │-        ) -> Self {
[INFO] [stdout]   136       │-            let node = node.unwrap();
[INFO] [stdout]   137       │-            #[allow(non_snake_case)]
[INFO] [stdout]   138       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   139       │-            fn extract_Number_v(
[INFO] [stdout]   140       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   141       │-                source: &[u8],
[INFO] [stdout]   142       │-                last_idx: &mut usize,
[INFO] [stdout]   143       │-            ) -> i32 {
[INFO] [stdout]   144       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   145       │-                    loop {
[INFO] [stdout]   146       │-                        let n = cursor.node();
[INFO] [stdout]   147       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   148       │-                            if name == "v" {
[INFO] [stdout]   149       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   150       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   151       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   152       │-                                    *cursor_opt = None;
[INFO] [stdout]   153       │-                                };
[INFO] [stdout]   154       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   155       │-                                return out;
[INFO] [stdout]   156       │-                            } else {
[INFO] [stdout]   157       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   158       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   159       │-                            }
[INFO] [stdout]   160       │-                        } else {
[INFO] [stdout]   161       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   162       │-                        }
[INFO] [stdout]   163       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   164       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   165       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   166       │-                        }
[INFO] [stdout]   167       │-                    }
[INFO] [stdout]   168       │-                } else {
[INFO] [stdout]   169       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   170       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   171       │-                        node,
[INFO] [stdout]   172       │-                        source,
[INFO] [stdout]   173       │-                        *last_idx,
[INFO] [stderr] error: test failed, to rerun pass `--lib`
[INFO] [stdout]   174       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]   175       │-                    );
[INFO] [stdout]   176       │-                }
[INFO] [stdout]   177       │-            }
[INFO] [stdout]   178       │-            #[allow(non_snake_case)]
[INFO] [stdout]   179       │-            fn extract_Number(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Number {
[INFO] [stdout]   180       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   181       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   182       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   183       │-                    Some(parent_cursor)
[INFO] [stdout]   184       │-                } else {
[INFO] [stdout]   185       │-                    None
[INFO] [stdout]   186       │-                };
[INFO] [stdout]   187       │-                Number {
[INFO] [stdout]   188       │-                    v: extract_Number_v(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   189       │-                }
[INFO] [stdout]   190       │-            }
[INFO] [stdout]   191       │-            extract_Number(node, source)
[INFO] [stdout]   192       │-        }
[INFO] [stdout]   193       │-    }
[INFO] [stdout]   194       │-    extern "C" {
[INFO] [stdout]   195       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   196       │-    }
[INFO] [stdout]   197       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   198       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   199       │-    }
[INFO] [stdout]   200       │-    pub fn parse(
[INFO] [stdout]   201       │-        input: &str,
[INFO] [stdout]   202       │-    ) -> core::result::Result<Language, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   203       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   204       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   205       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   206       │-        let root_node = tree.root_node();
[INFO] [stdout]   207       │-        if root_node.has_error() {
[INFO] [stdout]   208       │-            let mut errors = vec![];
[INFO] [stdout]   209       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   210       │-            Err(errors)
[INFO] [stdout]   211       │-        } else {
[INFO] [stdout]   212       │-            use rust_sitter::Extract;
[INFO] [stdout]   213       │-            Ok(<Language as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   214       │-                Some(root_node),
[INFO] [stdout]   215       │-                input.as_bytes(),
[INFO] [stdout]   216       │-                0,
[INFO] [stdout]   217       │-                None,
[INFO] [stdout]   218       │-            ))
[INFO] [stdout]   219       │-        }
[INFO] [stdout]   220       │-    }
[INFO] [stdout]   221       │-}
[INFO] [stdout]           0 │+mod grammar { pub struct Language { v : Option < i32 > , t : Option < Number > , } impl rust_sitter :: Extract < Language > for Language { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Language_v (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Option < i32 > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "v" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < rust_sitter :: WithLeaf < i32 > > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Language_t (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Option < Number > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "t" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Option < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Option < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Language (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Language { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Language { v : extract_Language_v (& mut cursor , source , & mut last_idx) , t : extract_Language_t (& mut cursor , source , & mut last_idx) } } extract_Language (node , source) } } pub struct Number { v : i32 } impl rust_sitter :: Extract < Number > for Number { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Number_v (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "v" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Number { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Number { v : extract_Number_v (& mut cursor , source , & mut last_idx) } } extract_Number (node , source) } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < Language , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< Language as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::struct_optional' panicked at src/lib.rs:391:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a9f38 - rust_sitter_macro::tests::struct_optional::hf6368effa40f858d
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:391:9
[INFO] [stdout]   22:     0x560fa65a8bb7 - rust_sitter_macro::tests::struct_optional::{{closure}}::h341f4f777081be00
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:390:26
[INFO] [stdout]   23:     0x560fa65b6a96 - core::ops::function::FnOnce::call_once::h6c846b6adfae90fa
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::struct_repeat stdout ----
[INFO] [stdout] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] [stdout] Snapshot file: src/snapshots/rust_sitter_macro__tests__struct_repeat.snap
[INFO] [stdout] Snapshot: struct_repeat
[INFO] [stdout] Source: src/lib.rs:363
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! {
[INFO] [stdout]                             #[rust_sitter :: grammar("test")] mod grammar
[INFO] [stdout]                             {
[INFO] [stdout]                                 #[rust_sitter :: language] pub struct NumberList
[INFO] [stdout]                                 { numbers : Vec < Number >, } pub struct Number
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter ::
[INFO] [stdout]                                     leaf(pattern = r"\d+", transform = | v |
[INFO] [stdout]                                     v.parse().unwrap())] v : i32
[INFO] [stdout]                                 } #[rust_sitter :: extra] struct Whitespace
[INFO] [stdout]                                 {
[INFO] [stdout]                                     #[rust_sitter :: leaf(pattern = r"\s")] _whitespace : (),
[INFO] [stdout]                                 }
[INFO] [stdout]                             }
[INFO] [stdout]                         }).to_token_stream().to_string())
[INFO] [stdout] ────────────────────────────────────────────────────────────────────────────────
[INFO] [stdout] -old snapshot
[INFO] [stdout] +new results
[INFO] [stdout] ────────────┬───────────────────────────────────────────────────────────────────
[INFO] [stdout]     0       │-mod grammar {
[INFO] [stdout]     1       │-    pub struct NumberList {
[INFO] [stdout]     2       │-        numbers: Vec<Number>,
[INFO] [stdout]     3       │-    }
[INFO] [stdout]     4       │-    impl rust_sitter::Extract<NumberList> for NumberList {
[INFO] [stdout]     5       │-        type LeafFn = ();
[INFO] [stdout]     6       │-        #[allow(non_snake_case)]
[INFO] [stdout]     7       │-        fn extract(
[INFO] [stdout]     8       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]     9       │-            source: &[u8],
[INFO] [stdout]    10       │-            last_idx: usize,
[INFO] [stdout]    11       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    12       │-        ) -> Self {
[INFO] [stdout]    13       │-            let node = node.unwrap();
[INFO] [stdout]    14       │-            #[allow(non_snake_case)]
[INFO] [stdout]    15       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    16       │-            fn extract_NumberList_numbers(
[INFO] [stdout]    17       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    18       │-                source: &[u8],
[INFO] [stdout]    19       │-                last_idx: &mut usize,
[INFO] [stdout]    20       │-            ) -> Vec<Number> {
[INFO] [stdout]    21       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    22       │-                    loop {
[INFO] [stdout]    23       │-                        let n = cursor.node();
[INFO] [stdout]    24       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]    25       │-                            if name == "numbers" {
[INFO] [stdout]    26       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]    27       │-                                let out = <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    28       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    29       │-                                );
[INFO] [stdout]    30       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]    31       │-                                    *cursor_opt = None;
[INFO] [stdout]    32       │-                                };
[INFO] [stdout]    33       │-                                *last_idx = n.end_byte();
[INFO] [stdout]    34       │-                                return out;
[INFO] [stdout]    35       │-                            } else {
[INFO] [stdout]    36       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    37       │-                                return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    38       │-                                    node, source, *last_idx, None,
[INFO] [stdout]    39       │-                                );
[INFO] [stdout]    40       │-                            }
[INFO] [stdout]    41       │-                        } else {
[INFO] [stdout]    42       │-                            *last_idx = n.end_byte();
[INFO] [stdout]    43       │-                        }
[INFO] [stdout]    44       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]    45       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    46       │-                            return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    47       │-                                node, source, *last_idx, None,
[INFO] [stdout]    48       │-                            );
[INFO] [stdout]    49       │-                        }
[INFO] [stdout]    50       │-                    }
[INFO] [stdout]    51       │-                } else {
[INFO] [stdout]    52       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]    53       │-                    return <Vec<Number> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]    54       │-                        node, source, *last_idx, None,
[INFO] [stdout]    55       │-                    );
[INFO] [stdout]    56       │-                }
[INFO] [stdout]    57       │-            }
[INFO] [stdout]    58       │-            #[allow(non_snake_case)]
[INFO] [stdout]    59       │-            fn extract_NumberList(
[INFO] [stdout]    60       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]    61       │-                source: &[u8],
[INFO] [stdout]    62       │-            ) -> NumberList {
[INFO] [stdout]    63       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]    64       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]    65       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]    66       │-                    Some(parent_cursor)
[INFO] [stdout]    67       │-                } else {
[INFO] [stdout]    68       │-                    None
[INFO] [stdout]    69       │-                };
[INFO] [stdout]    70       │-                NumberList {
[INFO] [stdout]    71       │-                    numbers: extract_NumberList_numbers(&mut cursor, source, &mut last_idx),
[INFO] [stdout]    72       │-                }
[INFO] [stdout]    73       │-            }
[INFO] [stdout]    74       │-            extract_NumberList(node, source)
[INFO] [stdout]    75       │-        }
[INFO] [stdout]    76       │-    }
[INFO] [stdout]    77       │-    pub struct Number {
[INFO] [stdout]    78       │-        v: i32,
[INFO] [stdout]    79       │-    }
[INFO] [stdout]    80       │-    impl rust_sitter::Extract<Number> for Number {
[INFO] [stdout]    81       │-        type LeafFn = ();
[INFO] [stdout]    82       │-        #[allow(non_snake_case)]
[INFO] [stdout]    83       │-        fn extract(
[INFO] [stdout]    84       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]    85       │-            source: &[u8],
[INFO] [stdout]    86       │-            last_idx: usize,
[INFO] [stdout]    87       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]    88       │-        ) -> Self {
[INFO] [stdout]    89       │-            let node = node.unwrap();
[INFO] [stdout]    90       │-            #[allow(non_snake_case)]
[INFO] [stdout]    91       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]    92       │-            fn extract_Number_v(
[INFO] [stdout]    93       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]    94       │-                source: &[u8],
[INFO] [stdout]    95       │-                last_idx: &mut usize,
[INFO] [stdout]    96       │-            ) -> i32 {
[INFO] [stdout]    97       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]    98       │-                    loop {
[INFO] [stdout]    99       │-                        let n = cursor.node();
[INFO] [stdout]   100       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   101       │-                            if name == "v" {
[INFO] [stdout]   102       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   103       │-                                let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   104       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   105       │-                                    *cursor_opt = None;
[INFO] [stdout]   106       │-                                };
[INFO] [stdout]   107       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   108       │-                                return out;
[INFO] [stdout]   109       │-                            } else {
[INFO] [stdout]   110       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   111       │-                                return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   112       │-                            }
[INFO] [stdout]   113       │-                        } else {
[INFO] [stdout]   114       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   115       │-                        }
[INFO] [stdout]   116       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   117       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   118       │-                            return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ;
[INFO] [stdout]   119       │-                        }
[INFO] [stdout]   120       │-                    }
[INFO] [stdout]   121       │-                } else {
[INFO] [stdout]   122       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   123       │-                    return <rust_sitter::WithLeaf<i32> as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   124       │-                        node,
[INFO] [stdout]   125       │-                        source,
[INFO] [stdout]   126       │-                        *last_idx,
[INFO] [stdout]   127       │-                        Some(&|v| v.parse().unwrap()),
[INFO] [stdout]   128       │-                    );
[INFO] [stdout]   129       │-                }
[INFO] [stdout]   130       │-            }
[INFO] [stdout]   131       │-            #[allow(non_snake_case)]
[INFO] [stdout]   132       │-            fn extract_Number(node: rust_sitter::tree_sitter::Node, source: &[u8]) -> Number {
[INFO] [stdout]   133       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   134       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   135       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   136       │-                    Some(parent_cursor)
[INFO] [stdout]   137       │-                } else {
[INFO] [stdout]   138       │-                    None
[INFO] [stdout]   139       │-                };
[INFO] [stdout]   140       │-                Number {
[INFO] [stdout]   141       │-                    v: extract_Number_v(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   142       │-                }
[INFO] [stdout]   143       │-            }
[INFO] [stdout]   144       │-            extract_Number(node, source)
[INFO] [stdout]   145       │-        }
[INFO] [stdout]   146       │-    }
[INFO] [stdout]   147       │-    struct Whitespace {
[INFO] [stdout]   148       │-        _whitespace: (),
[INFO] [stdout]   149       │-    }
[INFO] [stdout]   150       │-    impl rust_sitter::Extract<Whitespace> for Whitespace {
[INFO] [stdout]   151       │-        type LeafFn = ();
[INFO] [stdout]   152       │-        #[allow(non_snake_case)]
[INFO] [stdout]   153       │-        fn extract(
[INFO] [stdout]   154       │-            node: Option<rust_sitter::tree_sitter::Node>,
[INFO] [stdout]   155       │-            source: &[u8],
[INFO] [stdout]   156       │-            last_idx: usize,
[INFO] [stdout]   157       │-            _leaf_fn: Option<&Self::LeafFn>,
[INFO] [stdout]   158       │-        ) -> Self {
[INFO] [stdout]   159       │-            let node = node.unwrap();
[INFO] [stdout]   160       │-            #[allow(non_snake_case)]
[INFO] [stdout]   161       │-            #[allow(clippy::unused_unit)]
[INFO] [stdout]   162       │-            fn extract_Whitespace__whitespace(
[INFO] [stdout]   163       │-                cursor_opt: &mut Option<rust_sitter::tree_sitter::TreeCursor>,
[INFO] [stdout]   164       │-                source: &[u8],
[INFO] [stdout]   165       │-                last_idx: &mut usize,
[INFO] [stdout]   166       │-            ) -> () {
[INFO] [stdout]   167       │-                if let Some(cursor) = cursor_opt.as_mut() {
[INFO] [stdout]   168       │-                    loop {
[INFO] [stdout]   169       │-                        let n = cursor.node();
[INFO] [stdout]   170       │-                        if let Some(name) = cursor.field_name() {
[INFO] [stdout]   171       │-                            if name == "_whitespace" {
[INFO] [stdout]   172       │-                                let node: Option<rust_sitter::tree_sitter::Node> = Some(n);
[INFO] [stdout]   173       │-                                let out = <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   174       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   175       │-                                );
[INFO] [stdout]   176       │-                                if !cursor.goto_next_sibling() {
[INFO] [stdout]   177       │-                                    *cursor_opt = None;
[INFO] [stdout]   178       │-                                };
[INFO] [stdout]   179       │-                                *last_idx = n.end_byte();
[INFO] [stdout]   180       │-                                return out;
[INFO] [stdout]   181       │-                            } else {
[INFO] [stdout]   182       │-                                let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   183       │-                                return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   184       │-                                    node, source, *last_idx, None,
[INFO] [stdout]   185       │-                                );
[INFO] [stdout]   186       │-                            }
[INFO] [stdout]   187       │-                        } else {
[INFO] [stdout]   188       │-                            *last_idx = n.end_byte();
[INFO] [stdout]   189       │-                        }
[INFO] [stdout]   190       │-                        if !cursor.goto_next_sibling() {
[INFO] [stdout]   191       │-                            let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   192       │-                            return <() as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   193       │-                                node, source, *last_idx, None,
[INFO] [stdout]   194       │-                            );
[INFO] [stdout]   195       │-                        }
[INFO] [stdout]   196       │-                    }
[INFO] [stdout]   197       │-                } else {
[INFO] [stdout]   198       │-                    let node: Option<rust_sitter::tree_sitter::Node> = None;
[INFO] [stdout]   199       │-                    return <() as rust_sitter::Extract<_>>::extract(node, source, *last_idx, None);
[INFO] [stdout]   200       │-                }
[INFO] [stdout]   201       │-            }
[INFO] [stdout]   202       │-            #[allow(non_snake_case)]
[INFO] [stdout]   203       │-            fn extract_Whitespace(
[INFO] [stdout]   204       │-                node: rust_sitter::tree_sitter::Node,
[INFO] [stdout]   205       │-                source: &[u8],
[INFO] [stdout]   206       │-            ) -> Whitespace {
[INFO] [stdout]   207       │-                let mut last_idx = node.start_byte();
[INFO] [stdout]   208       │-                let mut parent_cursor = node.walk();
[INFO] [stdout]   209       │-                let mut cursor = if parent_cursor.goto_first_child() {
[INFO] [stdout]   210       │-                    Some(parent_cursor)
[INFO] [stdout]   211       │-                } else {
[INFO] [stdout]   212       │-                    None
[INFO] [stdout]   213       │-                };
[INFO] [stdout]   214       │-                Whitespace {
[INFO] [stdout]   215       │-                    _whitespace: extract_Whitespace__whitespace(&mut cursor, source, &mut last_idx),
[INFO] [stdout]   216       │-                }
[INFO] [stdout]   217       │-            }
[INFO] [stdout]   218       │-            extract_Whitespace(node, source)
[INFO] [stdout]   219       │-        }
[INFO] [stdout]   220       │-    }
[INFO] [stdout]   221       │-    extern "C" {
[INFO] [stdout]   222       │-        fn tree_sitter_test() -> rust_sitter::tree_sitter::Language;
[INFO] [stdout]   223       │-    }
[INFO] [stdout]   224       │-    pub fn language() -> rust_sitter::tree_sitter::Language {
[INFO] [stdout]   225       │-        unsafe { tree_sitter_test() }
[INFO] [stdout]   226       │-    }
[INFO] [stdout]   227       │-    pub fn parse(
[INFO] [stdout]   228       │-        input: &str,
[INFO] [stdout]   229       │-    ) -> core::result::Result<NumberList, Vec<rust_sitter::errors::ParseError>> {
[INFO] [stdout]   230       │-        let mut parser = rust_sitter::tree_sitter::Parser::new();
[INFO] [stdout]   231       │-        parser.set_language(language()).unwrap();
[INFO] [stdout]   232       │-        let tree = parser.parse(input, None).unwrap();
[INFO] [stdout]   233       │-        let root_node = tree.root_node();
[INFO] [stdout]   234       │-        if root_node.has_error() {
[INFO] [stdout]   235       │-            let mut errors = vec![];
[INFO] [stdout]   236       │-            rust_sitter::errors::collect_parsing_errors(&root_node, input.as_bytes(), &mut errors);
[INFO] [stdout]   237       │-            Err(errors)
[INFO] [stdout]   238       │-        } else {
[INFO] [stdout]   239       │-            use rust_sitter::Extract;
[INFO] [stdout]   240       │-            Ok(<NumberList as rust_sitter::Extract<_>>::extract(
[INFO] [stdout]   241       │-                Some(root_node),
[INFO] [stdout]   242       │-                input.as_bytes(),
[INFO] [stdout]   243       │-                0,
[INFO] [stdout]   244       │-                None,
[INFO] [stdout]   245       │-            ))
[INFO] [stdout]   246       │-        }
[INFO] [stdout]   247       │-    }
[INFO] [stdout]   248       │-}
[INFO] [stdout]           0 │+mod grammar { pub struct NumberList { numbers : Vec < Number > , } impl rust_sitter :: Extract < NumberList > for NumberList { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_NumberList_numbers (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> Vec < Number > { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "numbers" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < Vec < Number > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_NumberList (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> NumberList { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; NumberList { numbers : extract_NumberList_numbers (& mut cursor , source , & mut last_idx) } } extract_NumberList (node , source) } } pub struct Number { v : i32 } impl rust_sitter :: Extract < Number > for Number { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Number_v (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> i32 { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "v" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < rust_sitter :: WithLeaf < i32 > as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , Some (& | v | v . parse () . unwrap ())) ; } } # [allow (non_snake_case)] fn extract_Number (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Number { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Number { v : extract_Number_v (& mut cursor , source , & mut last_idx) } } extract_Number (node , source) } } struct Whitespace { _whitespace : () , } impl rust_sitter :: Extract < Whitespace > for Whitespace { type LeafFn = () ; # [allow (non_snake_case)] fn extract (node : Option < rust_sitter :: tree_sitter :: Node > , source : & [u8] , last_idx : usize , _leaf_fn : Option < & Self :: LeafFn >) -> Self { let node = node . unwrap () ; # [allow (non_snake_case)] # [allow (clippy :: unused_unit)] fn extract_Whitespace__whitespace (cursor_opt : & mut Option < rust_sitter :: tree_sitter :: TreeCursor > , source : & [u8] , last_idx : & mut usize) -> () { if let Some (cursor) = cursor_opt . as_mut () { loop { let n = cursor . node () ; if let Some (name) = cursor . field_name () { if name == "_whitespace" { let node : Option < rust_sitter :: tree_sitter :: Node > = Some (n) ; let out = < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; if ! cursor . goto_next_sibling () { * cursor_opt = None ; } ; * last_idx = n . end_byte () ; return out ; } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } else { * last_idx = n . end_byte () ; } if ! cursor . goto_next_sibling () { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } } else { let node : Option < rust_sitter :: tree_sitter :: Node > = None ; return < () as rust_sitter :: Extract < _ > > :: extract (node , source , * last_idx , None) ; } } # [allow (non_snake_case)] fn extract_Whitespace (node : rust_sitter :: tree_sitter :: Node , source : & [u8]) -> Whitespace { let mut last_idx = node . start_byte () ; let mut parent_cursor = node . walk () ; let mut cursor = if parent_cursor . goto_first_child () { Some (parent_cursor) } else { None } ; Whitespace { _whitespace : extract_Whitespace__whitespace (& mut cursor , source , & mut last_idx) } } extract_Whitespace (node , source) } } extern "C" { fn tree_sitter_test () -> rust_sitter :: tree_sitter :: Language ; } pub fn language () -> rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } pub fn parse (input : & str) -> core :: result :: Result < NumberList , Vec < rust_sitter :: errors :: ParseError > > { let mut parser = rust_sitter :: tree_sitter :: Parser :: new () ; parser . set_language (language ()) . unwrap () ; let tree = parser . parse (input , None) . unwrap () ; let root_node = tree . root_node () ; if root_node . has_error () { let mut errors = vec ! [] ; rust_sitter :: errors :: collect_parsing_errors (& root_node , input . as_bytes () , & mut errors ,) ; Err (errors) } else { use rust_sitter :: Extract ; Ok (< NumberList as rust_sitter :: Extract < _ > > :: extract (Some (root_node) , input . as_bytes () , 0 , None)) } } }
[INFO] [stdout] ────────────┴───────────────────────────────────────────────────────────────────
[INFO] [stdout] thread 'tests::struct_repeat' panicked at src/lib.rs:363:9:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
[INFO] [stdout]    1:     0x7f2e4dcea49c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stdout]    2:     0x7f2e4dcea49c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
[INFO] [stdout]    3:     0x7f2e4dcea49c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
[INFO] [stdout]    4:     0x7f2e4dd503fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
[INFO] [stdout]    5:     0x7f2e4dd503fc - core::fmt::write::hb8eaf5a8e45a738e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
[INFO] [stdout]    6:     0x7f2e4dcdd21e - std::io::Write::write_fmt::hd8d55fcb462ed7e9
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
[INFO] [stdout]    7:     0x7f2e4dcea284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
[INFO] [stdout]    8:     0x7f2e4dcea284 - std::sys_common::backtrace::print::h1360e9450e4f922a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
[INFO] [stdout]    9:     0x7f2e4dced193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
[INFO] [stdout]   10:     0x7f2e4dcece2f - std::panicking::default_hook::h6d75f5747cab6e8d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:287:9
[INFO] [stdout]   11:     0x7f2e4dde99cc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h22dfbb3222a0c5d6
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   12:     0x7f2e4dde99cc - test::test_main::{{closure}}::hf2fa6099cd421171
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:136:21
[INFO] [stdout]   13:     0x7f2e4dced9be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
[INFO] [stdout]   14:     0x7f2e4dced9be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
[INFO] [stdout]   15:     0x7f2e4dced747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
[INFO] [stdout]   16:     0x7f2e4dcea9c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
[INFO] [stdout]   17:     0x7f2e4dced492 - rust_begin_unwind
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
[INFO] [stdout]   18:     0x7f2e4dd4c803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
[INFO] [stdout]   19:     0x7f2e4dd4cdaa - core::result::unwrap_failed::hccb456d39e9c31fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
[INFO] [stdout]   20:     0x560fa65bac8c - core::result::Result<T,E>::unwrap::h24a049b5c4318b72
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23
[INFO] [stdout]   21:     0x560fa65a8b0f - rust_sitter_macro::tests::struct_repeat::hc12220043b28fcb9
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:363:9
[INFO] [stdout]   22:     0x560fa65a7787 - rust_sitter_macro::tests::struct_repeat::{{closure}}::h0f3800df5d35d0e9
[INFO] [stdout]                                at /opt/rustwide/workdir/src/lib.rs:362:24
[INFO] [stdout]   23:     0x560fa65b6b56 - core::ops::function::FnOnce::call_once::h7bb637168e624f78
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x7f2e4ddef53f - core::ops::function::FnOnce::call_once::he2e7294d6e0366fc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   25:     0x7f2e4ddef53f - test::__rust_begin_short_backtrace::h13549e99f98e3254
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18
[INFO] [stdout]   26:     0x7f2e4ddee5ce - test::run_test_in_process::{{closure}}::h9c2c3d1665ffe092
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60
[INFO] [stdout]   27:     0x7f2e4ddee5ce - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hec1896877d3d50ca
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   28:     0x7f2e4ddee5ce - std::panicking::try::do_call::hc7aed7412be3e0dc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   29:     0x7f2e4ddee5ce - std::panicking::try::h011fbc524cd7e3ba
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   30:     0x7f2e4ddee5ce - std::panic::catch_unwind::hff05d0891bc5bb82
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   31:     0x7f2e4ddee5ce - test::run_test_in_process::h87f0657a1c0aaab4
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27
[INFO] [stdout]   32:     0x7f2e4ddee5ce - test::run_test::{{closure}}::hc4dd34f501797e16
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43
[INFO] [stdout]   33:     0x7f2e4ddb0e93 - test::run_test::{{closure}}::h1201d47565297bcc
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41
[INFO] [stdout]   34:     0x7f2e4ddb0e93 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6de9d5784bb58c62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18
[INFO] [stdout]   35:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h0a3dd4432bd9a04d
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17
[INFO] [stdout]   36:     0x7f2e4ddb752b - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h05af39418a9230d5
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
[INFO] [stdout]   37:     0x7f2e4ddb752b - std::panicking::try::do_call::h6f430b03009d827b
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
[INFO] [stdout]   38:     0x7f2e4ddb752b - std::panicking::try::h3275ae04389ad69a
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
[INFO] [stdout]   39:     0x7f2e4ddb752b - std::panic::catch_unwind::h77f388467ce5722e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
[INFO] [stdout]   40:     0x7f2e4ddb752b - std::thread::Builder::spawn_unchecked_::{{closure}}::h308964f897d35a6e
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30
[INFO] [stdout]   41:     0x7f2e4ddb752b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h98d901cf00b6c865
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   42:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   43:     0x7f2e4dcf8295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
[INFO] [stdout]   44:     0x7f2e4dcf8295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
[INFO] [stdout]                                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
[INFO] [stdout]   45:     0x7f2e4da18b43 - <unknown>
[INFO] [stdout]   46:     0x7f2e4daa9bb4 - __clone
[INFO] [stdout]   47:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout]     tests::enum_prec_left
[INFO] [stdout]     tests::enum_recursive
[INFO] [stdout]     tests::enum_transformed_fields
[INFO] [stdout]     tests::enum_with_named_field
[INFO] [stdout]     tests::enum_with_unamed_vector
[INFO] [stdout]     tests::grammar_unboxed_field
[INFO] [stdout]     tests::spanned_in_vec
[INFO] [stdout]     tests::struct_extra
[INFO] [stdout]     tests::struct_optional
[INFO] [stdout]     tests::struct_repeat
[INFO] [stdout] 
[INFO] [stdout] test result: FAILED. 0 passed; 10 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.73s
[INFO] [stdout] 
[INFO] running `Command { std: "docker" "inspect" "e43331aa97c438ed02363cccc4ac40f0de4267554d9a6a849099cea1305386b2", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e43331aa97c438ed02363cccc4ac40f0de4267554d9a6a849099cea1305386b2", kill_on_drop: false }`
[INFO] [stdout] e43331aa97c438ed02363cccc4ac40f0de4267554d9a6a849099cea1305386b2
