[INFO] fetching crate rust-sitter-macro 0.4.5... [INFO] testing rust-sitter-macro-0.4.5 against 1.90.0 for beta-1.91-3 [INFO] extracting crate rust-sitter-macro 0.4.5 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate rust-sitter-macro 0.4.5 [INFO] finished tweaking crates.io crate rust-sitter-macro 0.4.5 [INFO] tweaked toml for crates.io crate rust-sitter-macro 0.4.5 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rust-sitter-macro 0.4.5 on toolchain 1.90.0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.90.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate rust-sitter-macro 0.4.5 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.90.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rust-sitter-common v0.4.5 [INFO] [stderr] Downloaded insta v1.42.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+1.90.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a1696c4c25e3ea1e8adea9c17d06f239561adab57657551ad5b243000709791a [INFO] running `Command { std: "docker" "start" "-a" "a1696c4c25e3ea1e8adea9c17d06f239561adab57657551ad5b243000709791a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a1696c4c25e3ea1e8adea9c17d06f239561adab57657551ad5b243000709791a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a1696c4c25e3ea1e8adea9c17d06f239561adab57657551ad5b243000709791a", kill_on_drop: false }` [INFO] [stdout] a1696c4c25e3ea1e8adea9c17d06f239561adab57657551ad5b243000709791a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+1.90.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6d7afd8d13e85844918f0242e9e3bf602dc48f2c181b72d27ffa41844a429b69 [INFO] running `Command { std: "docker" "start" "-a" "6d7afd8d13e85844918f0242e9e3bf602dc48f2c181b72d27ffa41844a429b69", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Compiling rust-sitter-common v0.4.5 [INFO] [stderr] Compiling rust-sitter-macro v0.4.5 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.61s [INFO] running `Command { std: "docker" "inspect" "6d7afd8d13e85844918f0242e9e3bf602dc48f2c181b72d27ffa41844a429b69", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6d7afd8d13e85844918f0242e9e3bf602dc48f2c181b72d27ffa41844a429b69", kill_on_drop: false }` [INFO] [stdout] 6d7afd8d13e85844918f0242e9e3bf602dc48f2c181b72d27ffa41844a429b69 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+1.90.0" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 337a87d223dd27170de5a801e8d355e71b43a3a2e851930cc3eb50a697809138 [INFO] running `Command { std: "docker" "start" "-a" "337a87d223dd27170de5a801e8d355e71b43a3a2e851930cc3eb50a697809138", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Compiling once_cell v1.20.3 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling linux-raw-sys v0.4.15 [INFO] [stderr] Compiling bitflags v2.8.0 [INFO] [stderr] Compiling linked-hash-map v0.5.6 [INFO] [stderr] Compiling similar v2.7.0 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Compiling console v0.15.10 [INFO] [stderr] Compiling tempfile v3.17.1 [INFO] [stderr] Compiling rust-sitter-common v0.4.5 [INFO] [stderr] Compiling pin-project-internal v1.1.9 [INFO] [stderr] Compiling rust-sitter-macro v0.4.5 (/opt/rustwide/workdir) [INFO] [stderr] Compiling pin-project v1.1.9 [INFO] [stderr] Compiling insta v1.42.1 [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 9.03s [INFO] running `Command { std: "docker" "inspect" "337a87d223dd27170de5a801e8d355e71b43a3a2e851930cc3eb50a697809138", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "337a87d223dd27170de5a801e8d355e71b43a3a2e851930cc3eb50a697809138", kill_on_drop: false }` [INFO] [stdout] 337a87d223dd27170de5a801e8d355e71b43a3a2e851930cc3eb50a697809138 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+1.90.0" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] d0d6c28cc6b7482bba25473db031e228918cc7231b3206600bf117caef8af339 [INFO] running `Command { std: "docker" "start" "-a" "d0d6c28cc6b7482bba25473db031e228918cc7231b3206600bf117caef8af339", kill_on_drop: false }` [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.04s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/rust_sitter_macro-c85e4481b313079f) [INFO] [stdout] [INFO] [stdout] running 10 tests [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stderr] error: 'rustfmt' is not installed for the toolchain '1.90.0-x86_64-unknown-linux-gnu'. [INFO] [stderr] To install, run `rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu rustfmt` [INFO] [stdout] test tests::spanned_in_vec ... FAILED [INFO] [stdout] test tests::struct_extra ... FAILED [INFO] [stdout] test tests::enum_recursive ... FAILED [INFO] [stdout] test tests::grammar_unboxed_field ... FAILED [INFO] [stdout] test tests::enum_transformed_fields ... FAILED [INFO] [stdout] test tests::struct_repeat ... FAILED [INFO] [stdout] test tests::enum_with_named_field ... FAILED [INFO] [stdout] test tests::enum_prec_left ... FAILED [INFO] [stdout] test tests::struct_optional ... FAILED [INFO] [stdout] test tests::enum_with_unamed_vector ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [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:504 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::grammar("test")] mod grammar [INFO] [stdout] { [INFO] [stdout] use rust_sitter::Spanned; #[rust_sitter::language] pub struct [INFO] [stdout] NumberList { numbers: Vec>, } pub struct Number [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] v: i32 [INFO] [stdout] } #[rust_sitter::extra] struct Whitespace [INFO] [stdout] { #[rust_sitter::leaf(pattern = r"\s")] _whitespace: (), } [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>, [INFO] [stdout] 4 │- } [INFO] [stdout] 5 │- impl ::rust_sitter::Extract 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 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 16 │- NumberList { [INFO] [stdout] 17 │- numbers: { [INFO] [stdout] 18 │- ::rust_sitter::__private::extract_field::>, _>( [INFO] [stdout] 19 │- cursor, source, last_idx, "numbers", None, [INFO] [stdout] 20 │- ) [INFO] [stdout] 21 │- }, [INFO] [stdout] 22 │- } [INFO] [stdout] 23 │- }) [INFO] [stdout] 24 │- } [INFO] [stdout] 25 │- } [INFO] [stdout] 26 │- pub struct Number { [INFO] [stdout] 27 │- v: i32, [INFO] [stdout] 28 │- } [INFO] [stdout] 29 │- impl ::rust_sitter::Extract for Number { [INFO] [stdout] 30 │- type LeafFn = (); [INFO] [stdout] 31 │- #[allow(non_snake_case)] [INFO] [stdout] 32 │- fn extract( [INFO] [stdout] 33 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 34 │- source: &[u8], [INFO] [stdout] 35 │- last_idx: usize, [INFO] [stdout] 36 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 37 │- ) -> Self { [INFO] [stdout] 38 │- let node = node.unwrap(); [INFO] [stdout] 39 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 40 │- Number { [INFO] [stdout] 41 │- v: { [INFO] [stdout] 42 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 43 │- cursor, [INFO] [stdout] 44 │- source, [INFO] [stdout] 45 │- last_idx, [INFO] [stdout] 46 │- "v", [INFO] [stdout] 47 │- Some(&|v| v.parse().unwrap()), [INFO] [stdout] 48 │- ) [INFO] [stdout] 49 │- }, [INFO] [stdout] 50 │- } [INFO] [stdout] 51 │- }) [INFO] [stdout] 52 │- } [INFO] [stdout] 53 │- } [INFO] [stdout] 54 │- struct Whitespace { [INFO] [stdout] 55 │- _whitespace: (), [INFO] [stdout] 56 │- } [INFO] [stdout] 57 │- impl ::rust_sitter::Extract for Whitespace { [INFO] [stdout] 58 │- type LeafFn = (); [INFO] [stdout] 59 │- #[allow(non_snake_case)] [INFO] [stdout] 60 │- fn extract( [INFO] [stdout] 61 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 62 │- source: &[u8], [INFO] [stdout] 63 │- last_idx: usize, [INFO] [stdout] 64 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 65 │- ) -> Self { [INFO] [stdout] 66 │- let node = node.unwrap(); [INFO] [stdout] 67 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 68 │- Whitespace { [INFO] [stdout] 69 │- _whitespace: { [INFO] [stdout] 70 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 71 │- cursor, [INFO] [stdout] 72 │- source, [INFO] [stdout] 73 │- last_idx, [INFO] [stdout] 74 │- "_whitespace", [INFO] [stdout] 75 │- None, [INFO] [stdout] 76 │- ) [INFO] [stdout] 77 │- }, [INFO] [stdout] 78 │- } [INFO] [stdout] 79 │- }) [INFO] [stdout] 80 │- } [INFO] [stdout] 81 │- } [INFO] [stdout] 82 │- extern "C" { [INFO] [stdout] 83 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 84 │- } [INFO] [stdout] 85 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 86 │- unsafe { tree_sitter_test() } [INFO] [stdout] 87 │- } [INFO] [stdout] 88 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 89 │- #[doc = "[`NumberList`]"] [INFO] [stdout] 90 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 91 │- pub fn parse( [INFO] [stdout] 92 │- input: &str, [INFO] [stdout] 93 │- ) -> core::result::Result> { [INFO] [stdout] 94 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 95 │- } [INFO] [stdout] 96 │-} [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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | NumberList { numbers : { :: rust_sitter :: __private :: extract_field :: < Vec < Spanned < Number > > , _ > (cursor , source , last_idx , "numbers" , None) } }) } } 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Number { v : { :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "v" , Some (& | v | v . parse () . unwrap ())) } }) } } 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Whitespace { _whitespace : { :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "_whitespace" , None) } }) } } extern "C" { fn tree_sitter_test () -> :: rust_sitter :: tree_sitter :: Language ; } pub fn language () -> :: rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`NumberList`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < NumberList , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < NumberList > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::spanned_in_vec' panicked at src/lib.rs:504:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__spanned_in_vec.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282b38d8 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282b38d8 - rust_sitter_macro::tests::spanned_in_vec::he144076529a76b40 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:504:9 [INFO] [stdout] 22: 0x5fc6282b24dd - rust_sitter_macro::tests::spanned_in_vec::{{closure}}::hf2ce7114352d68c0 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:503:28 [INFO] [stdout] 23: 0x5fc6282c6226 - core::ops::function::FnOnce::call_once::hc47c017dd35eee0f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:341 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [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::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] i32,), [INFO] [stdout] } #[rust_sitter::extra] struct Whitespace [INFO] [stdout] { #[rust_sitter::leaf(pattern = r"\s")] _whitespace: (), } [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 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 │- let mut cursor = node.walk(); [INFO] [stdout] 15 │- assert!( [INFO] [stdout] 16 │- cursor.goto_first_child(), [INFO] [stdout] 17 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 18 │- ); [INFO] [stdout] 19 │- loop { [INFO] [stdout] 20 │- let node = cursor.node(); [INFO] [stdout] 21 │- match node.kind() { [INFO] [stdout] 22 │- "Expression_Number" => { [INFO] [stdout] 23 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 24 │- node, [INFO] [stdout] 25 │- move |cursor, last_idx| { [INFO] [stdout] 26 │- Expression::Number({ [INFO] [stdout] 27 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 28 │- rust_sitter::WithLeaf, [INFO] [stdout] 29 │- _, [INFO] [stdout] 30 │- >( [INFO] [stdout] 31 │- cursor, source, last_idx, "0", Some(&|v| v.parse().unwrap()) [INFO] [stdout] 32 │- ) [INFO] [stdout] 33 │- }) [INFO] [stdout] 34 │- }, [INFO] [stdout] 35 │- ) [INFO] [stdout] 36 │- } [INFO] [stdout] 37 │- _ => { [INFO] [stdout] 38 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 39 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 40 │- } [INFO] [stdout] 41 │- } [INFO] [stdout] 42 │- } [INFO] [stdout] 43 │- } [INFO] [stdout] 44 │- } [INFO] [stdout] 45 │- } [INFO] [stdout] 46 │- struct Whitespace { [INFO] [stdout] 47 │- _whitespace: (), [INFO] [stdout] 48 │- } [INFO] [stdout] 49 │- impl ::rust_sitter::Extract for Whitespace { [INFO] [stdout] 50 │- type LeafFn = (); [INFO] [stdout] 51 │- #[allow(non_snake_case)] [INFO] [stdout] 52 │- fn extract( [INFO] [stdout] 53 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 54 │- source: &[u8], [INFO] [stdout] 55 │- last_idx: usize, [INFO] [stdout] 56 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 57 │- ) -> Self { [INFO] [stdout] 58 │- let node = node.unwrap(); [INFO] [stdout] 59 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 60 │- Whitespace { [INFO] [stdout] 61 │- _whitespace: { [INFO] [stdout] 62 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 63 │- cursor, [INFO] [stdout] 64 │- source, [INFO] [stdout] 65 │- last_idx, [INFO] [stdout] 66 │- "_whitespace", [INFO] [stdout] 67 │- None, [INFO] [stdout] 68 │- ) [INFO] [stdout] 69 │- }, [INFO] [stdout] 70 │- } [INFO] [stdout] 71 │- }) [INFO] [stdout] 72 │- } [INFO] [stdout] 73 │- } [INFO] [stdout] 74 │- extern "C" { [INFO] [stdout] 75 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 76 │- } [INFO] [stdout] 77 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 78 │- unsafe { tree_sitter_test() } [INFO] [stdout] 79 │- } [INFO] [stdout] 80 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 81 │- #[doc = "[`Expression`]"] [INFO] [stdout] 82 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 83 │- pub fn parse( [INFO] [stdout] 84 │- input: &str, [INFO] [stdout] 85 │- ) -> core::result::Result> { [INFO] [stdout] 86 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 87 │- } [INFO] [stdout] 88 │-} [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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expression_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "0" , Some (& | v | v . parse () . unwrap ())) })) , _ => 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Whitespace { _whitespace : { :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "_whitespace" , None) } }) } } extern "C" { fn tree_sitter_test () -> :: rust_sitter :: tree_sitter :: Language ; } pub fn language () -> :: rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expression`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expression > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::struct_extra' panicked at src/lib.rs:341:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__struct_extra.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282abd47 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282abd47 - rust_sitter_macro::tests::struct_extra::hc7b726b384af45d0 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:341:9 [INFO] [stdout] 22: 0x5fc6282aaafd - rust_sitter_macro::tests::struct_extra::{{closure}}::hb8b786aaba32c9b9 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:340:26 [INFO] [stdout] 23: 0x5fc6282c61e6 - core::ops::function::FnOnce::call_once::hb073a5f389bd1ed9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:285 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [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::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] i32), [INFO] [stdout] Neg(#[rust_sitter::leaf(text = "-")] (), Box), [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), [INFO] [stdout] 4 │- } [INFO] [stdout] 5 │- impl ::rust_sitter::Extract 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 │- let mut cursor = node.walk(); [INFO] [stdout] 16 │- assert!( [INFO] [stdout] 17 │- cursor.goto_first_child(), [INFO] [stdout] 18 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 19 │- ); [INFO] [stdout] 20 │- loop { [INFO] [stdout] 21 │- let node = cursor.node(); [INFO] [stdout] 22 │- match node.kind() { [INFO] [stdout] 23 │- "Expression_Number" => { [INFO] [stdout] 24 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 25 │- node, [INFO] [stdout] 26 │- move |cursor, last_idx| { [INFO] [stdout] 27 │- Expression::Number({ [INFO] [stdout] 28 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 29 │- rust_sitter::WithLeaf, [INFO] [stdout] 30 │- _, [INFO] [stdout] 31 │- >( [INFO] [stdout] 32 │- cursor, source, last_idx, "0", Some(&|v| v.parse().unwrap()) [INFO] [stdout] 33 │- ) [INFO] [stdout] 34 │- }) [INFO] [stdout] 35 │- }, [INFO] [stdout] 36 │- ) [INFO] [stdout] 37 │- } [INFO] [stdout] 38 │- "Expression_Neg" => { [INFO] [stdout] 39 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 40 │- node, [INFO] [stdout] 41 │- move |cursor, last_idx| { [INFO] [stdout] 42 │- Expression::Neg( [INFO] [stdout] 43 │- { [INFO] [stdout] 44 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 45 │- cursor, source, last_idx, "0", None, [INFO] [stdout] 46 │- ) [INFO] [stdout] 47 │- }, [INFO] [stdout] 48 │- { [INFO] [stdout] 49 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 50 │- cursor, source, last_idx, "1", None, [INFO] [stdout] 51 │- ) [INFO] [stdout] 52 │- }, [INFO] [stdout] 53 │- ) [INFO] [stdout] 54 │- }, [INFO] [stdout] 55 │- ) [INFO] [stdout] 56 │- } [INFO] [stdout] 57 │- _ => { [INFO] [stdout] 58 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 59 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 60 │- } [INFO] [stdout] 61 │- } [INFO] [stdout] 62 │- } [INFO] [stdout] 63 │- } [INFO] [stdout] 64 │- } [INFO] [stdout] 65 │- } [INFO] [stdout] 66 │- extern "C" { [INFO] [stdout] 67 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 68 │- } [INFO] [stdout] 69 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 70 │- unsafe { tree_sitter_test() } [INFO] [stdout] 71 │- } [INFO] [stdout] 72 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 73 │- #[doc = "[`Expression`]"] [INFO] [stdout] 74 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 75 │- pub fn parse( [INFO] [stdout] 76 │- input: &str, [INFO] [stdout] 77 │- ) -> core::result::Result> { [INFO] [stdout] 78 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 79 │- } [INFO] [stdout] 80 │-} [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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expression_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "0" , Some (& | v | v . parse () . unwrap ())) })) , "Expression_Neg" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Neg ({ :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "0" , None) } , { :: rust_sitter :: __private :: extract_field :: < Box < Expression > , _ > (cursor , source , last_idx , "1" , None) })) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expression`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expression > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::enum_recursive' panicked at src/lib.rs:285:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__enum_recursive.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282a9324 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282a9324 - rust_sitter_macro::tests::enum_recursive::h4e0c3f505924767f [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:285:9 [INFO] [stdout] 22: 0x5fc6282a81ad - rust_sitter_macro::tests::enum_recursive::{{closure}}::had8006158eed2e71 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:284:28 [INFO] [stdout] 23: 0x5fc6282c6106 - core::ops::function::FnOnce::call_once::h852cf543db47d687 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:368 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::grammar("test")] mod grammar [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::language] pub struct Language { e: Expression, } pub [INFO] [stdout] enum Expression [INFO] [stdout] { [INFO] [stdout] Number(#[rust_sitter::leaf(pattern = r"\d+", transform = |v: &str| [INFO] [stdout] v.parse::().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 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 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 15 │- Language { [INFO] [stdout] 16 │- e: { [INFO] [stdout] 17 │- ::rust_sitter::__private::extract_field::( [INFO] [stdout] 18 │- cursor, source, last_idx, "e", None, [INFO] [stdout] 19 │- ) [INFO] [stdout] 20 │- }, [INFO] [stdout] 21 │- } [INFO] [stdout] 22 │- }) [INFO] [stdout] 23 │- } [INFO] [stdout] 24 │- } [INFO] [stdout] 25 │- pub enum Expression { [INFO] [stdout] 26 │- Number(i32), [INFO] [stdout] 27 │- } [INFO] [stdout] 28 │- impl ::rust_sitter::Extract for Expression { [INFO] [stdout] 29 │- type LeafFn = (); [INFO] [stdout] 30 │- #[allow(non_snake_case)] [INFO] [stdout] 31 │- fn extract( [INFO] [stdout] 32 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 33 │- source: &[u8], [INFO] [stdout] 34 │- _last_idx: usize, [INFO] [stdout] 35 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 36 │- ) -> Self { [INFO] [stdout] 37 │- let node = node.unwrap(); [INFO] [stdout] 38 │- let mut cursor = node.walk(); [INFO] [stdout] 39 │- assert!( [INFO] [stdout] 40 │- cursor.goto_first_child(), [INFO] [stdout] 41 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 42 │- ); [INFO] [stdout] 43 │- loop { [INFO] [stdout] 44 │- let node = cursor.node(); [INFO] [stdout] 45 │- match node.kind() { [INFO] [stdout] 46 │- "Expression_Number" => { [INFO] [stdout] 47 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 48 │- node, [INFO] [stdout] 49 │- move |cursor, last_idx| { [INFO] [stdout] 50 │- Expression::Number({ [INFO] [stdout] 51 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 52 │- rust_sitter::WithLeaf, [INFO] [stdout] 53 │- _, [INFO] [stdout] 54 │- >( [INFO] [stdout] 55 │- cursor, [INFO] [stdout] 56 │- source, [INFO] [stdout] 57 │- last_idx, [INFO] [stdout] 58 │- "0", [INFO] [stdout] 59 │- Some(&|v: &str| v.parse::().unwrap()), [INFO] [stdout] 60 │- ) [INFO] [stdout] 61 │- }) [INFO] [stdout] 62 │- }, [INFO] [stdout] 63 │- ) [INFO] [stdout] 64 │- } [INFO] [stdout] 65 │- _ => { [INFO] [stdout] 66 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 67 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 68 │- } [INFO] [stdout] 69 │- } [INFO] [stdout] 70 │- } [INFO] [stdout] 71 │- } [INFO] [stdout] 72 │- } [INFO] [stdout] 73 │- } [INFO] [stdout] 74 │- extern "C" { [INFO] [stdout] 75 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 76 │- } [INFO] [stdout] 77 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 78 │- unsafe { tree_sitter_test() } [INFO] [stdout] 79 │- } [INFO] [stdout] 80 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 81 │- #[doc = "[`Language`]"] [INFO] [stdout] 82 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 83 │- pub fn parse( [INFO] [stdout] 84 │- input: &str, [INFO] [stdout] 85 │- ) -> core::result::Result> { [INFO] [stdout] 86 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 87 │- } [INFO] [stdout] 88 │-} [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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Language { e : { :: rust_sitter :: __private :: extract_field :: < Expression , _ > (cursor , source , last_idx , "e" , None) } }) } } 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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expression_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "0" , Some (& | v : & str | v . parse :: < i32 > () . unwrap ())) })) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Language`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Language , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Language > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::grammar_unboxed_field' panicked at src/lib.rs:368:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__grammar_unboxed_field.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282acfcf - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282acfcf - rust_sitter_macro::tests::grammar_unboxed_field::h7284068bf078ff58 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:368:9 [INFO] [stdout] 22: 0x5fc6282abf7d - rust_sitter_macro::tests::grammar_unboxed_field::{{closure}}::h2108bd984ffc90e8 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:367:35 [INFO] [stdout] 23: 0x5fc6282c6396 - core::ops::function::FnOnce::call_once::hf9c2f12c2d159966 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:263 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [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::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse::().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 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 │- let mut cursor = node.walk(); [INFO] [stdout] 15 │- assert!( [INFO] [stdout] 16 │- cursor.goto_first_child(), [INFO] [stdout] 17 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 18 │- ); [INFO] [stdout] 19 │- loop { [INFO] [stdout] 20 │- let node = cursor.node(); [INFO] [stdout] 21 │- match node.kind() { [INFO] [stdout] 22 │- "Expression_Number" => { [INFO] [stdout] 23 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 24 │- node, [INFO] [stdout] 25 │- move |cursor, last_idx| { [INFO] [stdout] 26 │- Expression::Number({ [INFO] [stdout] 27 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 28 │- rust_sitter::WithLeaf, [INFO] [stdout] 29 │- _, [INFO] [stdout] 30 │- >( [INFO] [stdout] 31 │- cursor, [INFO] [stdout] 32 │- source, [INFO] [stdout] 33 │- last_idx, [INFO] [stdout] 34 │- "0", [INFO] [stdout] 35 │- Some(&|v| v.parse::().unwrap()), [INFO] [stdout] 36 │- ) [INFO] [stdout] 37 │- }) [INFO] [stdout] 38 │- }, [INFO] [stdout] 39 │- ) [INFO] [stdout] 40 │- } [INFO] [stdout] 41 │- _ => { [INFO] [stdout] 42 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 43 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 44 │- } [INFO] [stdout] 45 │- } [INFO] [stdout] 46 │- } [INFO] [stdout] 47 │- } [INFO] [stdout] 48 │- } [INFO] [stdout] 49 │- } [INFO] [stdout] 50 │- extern "C" { [INFO] [stdout] 51 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 52 │- } [INFO] [stdout] 53 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 54 │- unsafe { tree_sitter_test() } [INFO] [stdout] 55 │- } [INFO] [stdout] 56 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 57 │- #[doc = "[`Expression`]"] [INFO] [stdout] 58 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 59 │- pub fn parse( [INFO] [stdout] 60 │- input: &str, [INFO] [stdout] 61 │- ) -> core::result::Result> { [INFO] [stdout] 62 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 63 │- } [INFO] [stdout] 64 │-} [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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expression_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "0" , Some (& | v | v . parse :: < i32 > () . unwrap ())) })) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expression`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expression > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::enum_transformed_fields' panicked at src/lib.rs:263:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__enum_transformed_fields.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282a7f7a - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282a7f7a - rust_sitter_macro::tests::enum_transformed_fields::hea6a95d2b06016ca [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:263:9 [INFO] [stdout] 22: 0x5fc6282a70ad - rust_sitter_macro::tests::enum_transformed_fields::{{closure}}::habe657c03f74bc11 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:262:37 [INFO] [stdout] 23: 0x5fc6282c62d6 - core::ops::function::FnOnce::call_once::he4b622ba0fb28ed9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:394 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::grammar("test")] mod grammar [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::language] pub struct NumberList [INFO] [stdout] { numbers: Vec, } pub struct Number [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] v: i32 [INFO] [stdout] } #[rust_sitter::extra] struct Whitespace [INFO] [stdout] { #[rust_sitter::leaf(pattern = r"\s")] _whitespace: (), } [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, [INFO] [stdout] 3 │- } [INFO] [stdout] 4 │- impl ::rust_sitter::Extract 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 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 15 │- NumberList { [INFO] [stdout] 16 │- numbers: { [INFO] [stdout] 17 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 18 │- cursor, source, last_idx, "numbers", None, [INFO] [stdout] 19 │- ) [INFO] [stdout] 20 │- }, [INFO] [stdout] 21 │- } [INFO] [stdout] 22 │- }) [INFO] [stdout] 23 │- } [INFO] [stdout] 24 │- } [INFO] [stdout] 25 │- pub struct Number { [INFO] [stdout] 26 │- v: i32, [INFO] [stdout] 27 │- } [INFO] [stdout] 28 │- impl ::rust_sitter::Extract for Number { [INFO] [stdout] 29 │- type LeafFn = (); [INFO] [stdout] 30 │- #[allow(non_snake_case)] [INFO] [stdout] 31 │- fn extract( [INFO] [stdout] 32 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 33 │- source: &[u8], [INFO] [stdout] 34 │- last_idx: usize, [INFO] [stdout] 35 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 36 │- ) -> Self { [INFO] [stdout] 37 │- let node = node.unwrap(); [INFO] [stdout] 38 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 39 │- Number { [INFO] [stdout] 40 │- v: { [INFO] [stdout] 41 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 42 │- cursor, [INFO] [stdout] 43 │- source, [INFO] [stdout] 44 │- last_idx, [INFO] [stdout] 45 │- "v", [INFO] [stdout] 46 │- Some(&|v| v.parse().unwrap()), [INFO] [stdout] 47 │- ) [INFO] [stdout] 48 │- }, [INFO] [stdout] 49 │- } [INFO] [stdout] 50 │- }) [INFO] [stdout] 51 │- } [INFO] [stdout] 52 │- } [INFO] [stdout] 53 │- struct Whitespace { [INFO] [stdout] 54 │- _whitespace: (), [INFO] [stdout] 55 │- } [INFO] [stdout] 56 │- impl ::rust_sitter::Extract for Whitespace { [INFO] [stdout] 57 │- type LeafFn = (); [INFO] [stdout] 58 │- #[allow(non_snake_case)] [INFO] [stdout] 59 │- fn extract( [INFO] [stdout] 60 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 61 │- source: &[u8], [INFO] [stdout] 62 │- last_idx: usize, [INFO] [stdout] 63 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 64 │- ) -> Self { [INFO] [stdout] 65 │- let node = node.unwrap(); [INFO] [stdout] 66 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 67 │- Whitespace { [INFO] [stdout] 68 │- _whitespace: { [INFO] [stdout] 69 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 70 │- cursor, [INFO] [stdout] 71 │- source, [INFO] [stdout] 72 │- last_idx, [INFO] [stdout] 73 │- "_whitespace", [INFO] [stdout] 74 │- None, [INFO] [stdout] 75 │- ) [INFO] [stdout] 76 │- }, [INFO] [stdout] 77 │- } [INFO] [stdout] 78 │- }) [INFO] [stdout] 79 │- } [INFO] [stdout] 80 │- } [INFO] [stdout] 81 │- extern "C" { [INFO] [stdout] 82 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 83 │- } [INFO] [stdout] 84 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 85 │- unsafe { tree_sitter_test() } [INFO] [stdout] 86 │- } [INFO] [stdout] 87 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 88 │- #[doc = "[`NumberList`]"] [INFO] [stdout] 89 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 90 │- pub fn parse( [INFO] [stdout] 91 │- input: &str, [INFO] [stdout] 92 │- ) -> core::result::Result> { [INFO] [stdout] 93 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 94 │- } [INFO] [stdout] 95 │-} [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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | NumberList { numbers : { :: rust_sitter :: __private :: extract_field :: < Vec < Number > , _ > (cursor , source , last_idx , "numbers" , None) } }) } } 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Number { v : { :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "v" , Some (& | v | v . parse () . unwrap ())) } }) } } 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Whitespace { _whitespace : { :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "_whitespace" , None) } }) } } extern "C" { fn tree_sitter_test () -> :: rust_sitter :: tree_sitter :: Language ; } pub fn language () -> :: rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`NumberList`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < NumberList , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < NumberList > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::struct_repeat' panicked at src/lib.rs:394:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__struct_repeat.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282ae550 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282ae550 - rust_sitter_macro::tests::struct_repeat::h4cf7c0c90da8cc96 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:394:9 [INFO] [stdout] 22: 0x5fc6282ad20d - rust_sitter_macro::tests::struct_repeat::{{closure}}::hff48c927b26960f9 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:393:27 [INFO] [stdout] 23: 0x5fc6282c6056 - core::ops::function::FnOnce::call_once::h598ae53403b3f118 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:477 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [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::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] u32), Neg [INFO] [stdout] { #[rust_sitter::leaf(text = "!")] _bang: (), value: Box, } [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 }, [INFO] [stdout] 4 │- } [INFO] [stdout] 5 │- impl ::rust_sitter::Extract 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 │- let mut cursor = node.walk(); [INFO] [stdout] 16 │- assert!( [INFO] [stdout] 17 │- cursor.goto_first_child(), [INFO] [stdout] 18 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 19 │- ); [INFO] [stdout] 20 │- loop { [INFO] [stdout] 21 │- let node = cursor.node(); [INFO] [stdout] 22 │- match node.kind() { [INFO] [stdout] 23 │- "Expr_Number" => { [INFO] [stdout] 24 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 25 │- node, [INFO] [stdout] 26 │- move |cursor, last_idx| { [INFO] [stdout] 27 │- Expr::Number({ [INFO] [stdout] 28 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 29 │- rust_sitter::WithLeaf, [INFO] [stdout] 30 │- _, [INFO] [stdout] 31 │- >( [INFO] [stdout] 32 │- cursor, source, last_idx, "0", Some(&|v| v.parse().unwrap()) [INFO] [stdout] 33 │- ) [INFO] [stdout] 34 │- }) [INFO] [stdout] 35 │- }, [INFO] [stdout] 36 │- ) [INFO] [stdout] 37 │- } [INFO] [stdout] 38 │- "Expr_Neg" => { [INFO] [stdout] 39 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 40 │- node, [INFO] [stdout] 41 │- move |cursor, last_idx| Expr::Neg { [INFO] [stdout] 42 │- _bang: { [INFO] [stdout] 43 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 44 │- cursor, source, last_idx, "_bang", None, [INFO] [stdout] 45 │- ) [INFO] [stdout] 46 │- }, [INFO] [stdout] 47 │- value: { [INFO] [stdout] 48 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 49 │- cursor, source, last_idx, "value", None, [INFO] [stdout] 50 │- ) [INFO] [stdout] 51 │- }, [INFO] [stdout] 52 │- }, [INFO] [stdout] 53 │- ) [INFO] [stdout] 54 │- } [INFO] [stdout] 55 │- _ => { [INFO] [stdout] 56 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 57 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 58 │- } [INFO] [stdout] 59 │- } [INFO] [stdout] 60 │- } [INFO] [stdout] 61 │- } [INFO] [stdout] 62 │- } [INFO] [stdout] 63 │- } [INFO] [stdout] 64 │- extern "C" { [INFO] [stdout] 65 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 66 │- } [INFO] [stdout] 67 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 68 │- unsafe { tree_sitter_test() } [INFO] [stdout] 69 │- } [INFO] [stdout] 70 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 71 │- #[doc = "[`Expr`]"] [INFO] [stdout] 72 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 73 │- pub fn parse( [INFO] [stdout] 74 │- input: &str, [INFO] [stdout] 75 │- ) -> core::result::Result> { [INFO] [stdout] 76 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 77 │- } [INFO] [stdout] 78 │-} [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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expr_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expr :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < u32 > , _ > (cursor , source , last_idx , "0" , Some (& | v | v . parse () . unwrap ())) })) , "Expr_Neg" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expr :: Neg { _bang : { :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "_bang" , None) } , value : { :: rust_sitter :: __private :: extract_field :: < Box < Expr > , _ > (cursor , source , last_idx , "value" , None) } }) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expr`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expr , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expr > (input , language) } } [INFO] [stderr] error: test failed, to rerun pass `--lib` [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::enum_with_named_field' panicked at src/lib.rs:477:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__enum_with_named_field.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282b22ab - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282b22ab - rust_sitter_macro::tests::enum_with_named_field::hcff19465c3d97bbb [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:477:9 [INFO] [stdout] 22: 0x5fc6282b10cd - rust_sitter_macro::tests::enum_with_named_field::{{closure}}::ha1a4bca44da14313 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:476:35 [INFO] [stdout] 23: 0x5fc6282c5fe6 - core::ops::function::FnOnce::call_once::h4bf70cd49df17216 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:312 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [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::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] i32), #[rust_sitter::prec_left(1)] [INFO] [stdout] Sub(Box, #[rust_sitter::leaf(text = "-")] (), [INFO] [stdout] Box), [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, (), Box), [INFO] [stdout] 4 │- } [INFO] [stdout] 5 │- impl ::rust_sitter::Extract 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 │- let mut cursor = node.walk(); [INFO] [stdout] 16 │- assert!( [INFO] [stdout] 17 │- cursor.goto_first_child(), [INFO] [stdout] 18 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 19 │- ); [INFO] [stdout] 20 │- loop { [INFO] [stdout] 21 │- let node = cursor.node(); [INFO] [stdout] 22 │- match node.kind() { [INFO] [stdout] 23 │- "Expression_Number" => { [INFO] [stdout] 24 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 25 │- node, [INFO] [stdout] 26 │- move |cursor, last_idx| { [INFO] [stdout] 27 │- Expression::Number({ [INFO] [stdout] 28 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 29 │- rust_sitter::WithLeaf, [INFO] [stdout] 30 │- _, [INFO] [stdout] 31 │- >( [INFO] [stdout] 32 │- cursor, source, last_idx, "0", Some(&|v| v.parse().unwrap()) [INFO] [stdout] 33 │- ) [INFO] [stdout] 34 │- }) [INFO] [stdout] 35 │- }, [INFO] [stdout] 36 │- ) [INFO] [stdout] 37 │- } [INFO] [stdout] 38 │- "Expression_Sub" => { [INFO] [stdout] 39 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 40 │- node, [INFO] [stdout] 41 │- move |cursor, last_idx| { [INFO] [stdout] 42 │- Expression::Sub( [INFO] [stdout] 43 │- { [INFO] [stdout] 44 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 45 │- cursor, source, last_idx, "0", None, [INFO] [stdout] 46 │- ) [INFO] [stdout] 47 │- }, [INFO] [stdout] 48 │- { [INFO] [stdout] 49 │- ::rust_sitter::__private::extract_field::<(), _>( [INFO] [stdout] 50 │- cursor, source, last_idx, "1", None, [INFO] [stdout] 51 │- ) [INFO] [stdout] 52 │- }, [INFO] [stdout] 53 │- { [INFO] [stdout] 54 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 55 │- cursor, source, last_idx, "2", None, [INFO] [stdout] 56 │- ) [INFO] [stdout] 57 │- }, [INFO] [stdout] 58 │- ) [INFO] [stdout] 59 │- }, [INFO] [stdout] 60 │- ) [INFO] [stdout] 61 │- } [INFO] [stdout] 62 │- _ => { [INFO] [stdout] 63 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 64 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 65 │- } [INFO] [stdout] 66 │- } [INFO] [stdout] 67 │- } [INFO] [stdout] 68 │- } [INFO] [stdout] 69 │- } [INFO] [stdout] 70 │- } [INFO] [stdout] 71 │- extern "C" { [INFO] [stdout] 72 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 73 │- } [INFO] [stdout] 74 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 75 │- unsafe { tree_sitter_test() } [INFO] [stdout] 76 │- } [INFO] [stdout] 77 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 78 │- #[doc = "[`Expression`]"] [INFO] [stdout] 79 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 80 │- pub fn parse( [INFO] [stdout] 81 │- input: &str, [INFO] [stdout] 82 │- ) -> core::result::Result> { [INFO] [stdout] 83 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 84 │- } [INFO] [stdout] 85 │-} [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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expression_Number" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Number ({ :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "0" , Some (& | v | v . parse () . unwrap ())) })) , "Expression_Sub" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expression :: Sub ({ :: rust_sitter :: __private :: extract_field :: < Box < Expression > , _ > (cursor , source , last_idx , "0" , None) } , { :: rust_sitter :: __private :: extract_field :: < () , _ > (cursor , source , last_idx , "1" , None) } , { :: rust_sitter :: __private :: extract_field :: < Box < Expression > , _ > (cursor , source , last_idx , "2" , None) })) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expression`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expression , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expression > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::enum_prec_left' panicked at src/lib.rs:312:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__enum_prec_left.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282aa8cc - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282aa8cc - rust_sitter_macro::tests::enum_prec_left::h67dd064a87d67975 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:312:9 [INFO] [stdout] 22: 0x5fc6282a955d - rust_sitter_macro::tests::enum_prec_left::{{closure}}::h8add04fa45b22c7a [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:311:28 [INFO] [stdout] 23: 0x5fc6282c6146 - core::ops::function::FnOnce::call_once::h8d838bfa94b7de53 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:424 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::grammar("test")] mod grammar [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::language] pub struct Language [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] v: Option, t: Option, [INFO] [stdout] } pub struct Number [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::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, [INFO] [stdout] 3 │- t: Option, [INFO] [stdout] 4 │- } [INFO] [stdout] 5 │- impl ::rust_sitter::Extract 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 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 16 │- Language { [INFO] [stdout] 17 │- v: { [INFO] [stdout] 18 │- ::rust_sitter::__private::extract_field::< [INFO] [stdout] 19 │- Option>, [INFO] [stdout] 20 │- _, [INFO] [stdout] 21 │- >( [INFO] [stdout] 22 │- cursor, source, last_idx, "v", Some(&|v| v.parse().unwrap()) [INFO] [stdout] 23 │- ) [INFO] [stdout] 24 │- }, [INFO] [stdout] 25 │- t: { [INFO] [stdout] 26 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 27 │- cursor, source, last_idx, "t", None, [INFO] [stdout] 28 │- ) [INFO] [stdout] 29 │- }, [INFO] [stdout] 30 │- } [INFO] [stdout] 31 │- }) [INFO] [stdout] 32 │- } [INFO] [stdout] 33 │- } [INFO] [stdout] 34 │- pub struct Number { [INFO] [stdout] 35 │- v: i32, [INFO] [stdout] 36 │- } [INFO] [stdout] 37 │- impl ::rust_sitter::Extract for Number { [INFO] [stdout] 38 │- type LeafFn = (); [INFO] [stdout] 39 │- #[allow(non_snake_case)] [INFO] [stdout] 40 │- fn extract( [INFO] [stdout] 41 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 42 │- source: &[u8], [INFO] [stdout] 43 │- last_idx: usize, [INFO] [stdout] 44 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 45 │- ) -> Self { [INFO] [stdout] 46 │- let node = node.unwrap(); [INFO] [stdout] 47 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 48 │- Number { [INFO] [stdout] 49 │- v: { [INFO] [stdout] 50 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 51 │- cursor, [INFO] [stdout] 52 │- source, [INFO] [stdout] 53 │- last_idx, [INFO] [stdout] 54 │- "v", [INFO] [stdout] 55 │- Some(&|v| v.parse().unwrap()), [INFO] [stdout] 56 │- ) [INFO] [stdout] 57 │- }, [INFO] [stdout] 58 │- } [INFO] [stdout] 59 │- }) [INFO] [stdout] 60 │- } [INFO] [stdout] 61 │- } [INFO] [stdout] 62 │- extern "C" { [INFO] [stdout] 63 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 64 │- } [INFO] [stdout] 65 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 66 │- unsafe { tree_sitter_test() } [INFO] [stdout] 67 │- } [INFO] [stdout] 68 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 69 │- #[doc = "[`Language`]"] [INFO] [stdout] 70 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 71 │- pub fn parse( [INFO] [stdout] 72 │- input: &str, [INFO] [stdout] 73 │- ) -> core::result::Result> { [INFO] [stdout] 74 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 75 │- } [INFO] [stdout] 76 │-} [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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Language { v : { :: rust_sitter :: __private :: extract_field :: < Option < rust_sitter :: WithLeaf < i32 > > , _ > (cursor , source , last_idx , "v" , Some (& | v | v . parse () . unwrap ())) } , t : { :: rust_sitter :: __private :: extract_field :: < Option < Number > , _ > (cursor , source , last_idx , "t" , None) } }) } } 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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Number { v : { :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < i32 > , _ > (cursor , source , last_idx , "v" , Some (& | v | v . parse () . unwrap ())) } }) } } extern "C" { fn tree_sitter_test () -> :: rust_sitter :: tree_sitter :: Language ; } pub fn language () -> :: rust_sitter :: tree_sitter :: Language { unsafe { tree_sitter_test () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Language`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Language , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Language > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::struct_optional' panicked at src/lib.rs:424:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__struct_optional.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282afad1 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282afad1 - rust_sitter_macro::tests::struct_optional::h01c953f2a2e7e2e1 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:424:9 [INFO] [stdout] 22: 0x5fc6282ae78d - rust_sitter_macro::tests::struct_optional::{{closure}}::h2d26aa2f63c06f07 [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:423:29 [INFO] [stdout] 23: 0x5fc6282c6316 - core::ops::function::FnOnce::call_once::he80aec159354441c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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:450 [INFO] [stdout] ──────────────────────────────────────────────────────────────────────────────── [INFO] [stdout] Expression: rustfmt_code(&expand_grammar(parse_quote! [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::grammar("test")] mod grammar [INFO] [stdout] { [INFO] [stdout] pub struct Number [INFO] [stdout] { [INFO] [stdout] #[rust_sitter::leaf(pattern = r"\d+", transform = |v| [INFO] [stdout] v.parse().unwrap())] value: u32 [INFO] [stdout] } #[rust_sitter::language] pub enum Expr [INFO] [stdout] { Numbers(#[rust_sitter::repeat(non_empty = true)] Vec) } [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 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 │- ::rust_sitter::__private::extract_struct_or_variant(node, move |cursor, last_idx| { [INFO] [stdout] 15 │- Number { [INFO] [stdout] 16 │- value: { [INFO] [stdout] 17 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 18 │- cursor, [INFO] [stdout] 19 │- source, [INFO] [stdout] 20 │- last_idx, [INFO] [stdout] 21 │- "value", [INFO] [stdout] 22 │- Some(&|v| v.parse().unwrap()), [INFO] [stdout] 23 │- ) [INFO] [stdout] 24 │- }, [INFO] [stdout] 25 │- } [INFO] [stdout] 26 │- }) [INFO] [stdout] 27 │- } [INFO] [stdout] 28 │- } [INFO] [stdout] 29 │- pub enum Expr { [INFO] [stdout] 30 │- Numbers(Vec), [INFO] [stdout] 31 │- } [INFO] [stdout] 32 │- impl ::rust_sitter::Extract for Expr { [INFO] [stdout] 33 │- type LeafFn = (); [INFO] [stdout] 34 │- #[allow(non_snake_case)] [INFO] [stdout] 35 │- fn extract( [INFO] [stdout] 36 │- node: Option<::rust_sitter::tree_sitter::Node>, [INFO] [stdout] 37 │- source: &[u8], [INFO] [stdout] 38 │- _last_idx: usize, [INFO] [stdout] 39 │- _leaf_fn: Option<&Self::LeafFn>, [INFO] [stdout] 40 │- ) -> Self { [INFO] [stdout] 41 │- let node = node.unwrap(); [INFO] [stdout] 42 │- let mut cursor = node.walk(); [INFO] [stdout] 43 │- assert!( [INFO] [stdout] 44 │- cursor.goto_first_child(), [INFO] [stdout] 45 │- "Could not find a child corresponding to any enum branch" [INFO] [stdout] 46 │- ); [INFO] [stdout] 47 │- loop { [INFO] [stdout] 48 │- let node = cursor.node(); [INFO] [stdout] 49 │- match node.kind() { [INFO] [stdout] 50 │- "Expr_Numbers" => { [INFO] [stdout] 51 │- return ::rust_sitter::__private::extract_struct_or_variant( [INFO] [stdout] 52 │- node, [INFO] [stdout] 53 │- move |cursor, last_idx| { [INFO] [stdout] 54 │- Expr::Numbers({ [INFO] [stdout] 55 │- ::rust_sitter::__private::extract_field::, _>( [INFO] [stdout] 56 │- cursor, source, last_idx, "0", None, [INFO] [stdout] 57 │- ) [INFO] [stdout] 58 │- }) [INFO] [stdout] 59 │- }, [INFO] [stdout] 60 │- ) [INFO] [stdout] 61 │- } [INFO] [stdout] 62 │- _ => { [INFO] [stdout] 63 │- if !cursor.goto_next_sibling() { [INFO] [stdout] 64 │- panic!("Could not find a child corresponding to any enum branch") [INFO] [stdout] 65 │- } [INFO] [stdout] 66 │- } [INFO] [stdout] 67 │- } [INFO] [stdout] 68 │- } [INFO] [stdout] 69 │- } [INFO] [stdout] 70 │- } [INFO] [stdout] 71 │- extern "C" { [INFO] [stdout] 72 │- fn tree_sitter_test() -> ::rust_sitter::tree_sitter::Language; [INFO] [stdout] 73 │- } [INFO] [stdout] 74 │- pub fn language() -> ::rust_sitter::tree_sitter::Language { [INFO] [stdout] 75 │- unsafe { tree_sitter_test() } [INFO] [stdout] 76 │- } [INFO] [stdout] 77 │- #[doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] [INFO] [stdout] 78 │- #[doc = "[`Expr`]"] [INFO] [stdout] 79 │- #[doc = r" instance containing the parsed structured data."] [INFO] [stdout] 80 │- pub fn parse( [INFO] [stdout] 81 │- input: &str, [INFO] [stdout] 82 │- ) -> core::result::Result> { [INFO] [stdout] 83 │- ::rust_sitter::__private::parse::(input, language) [INFO] [stdout] 84 │- } [INFO] [stdout] 85 │-} [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 () ; :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Number { value : { :: rust_sitter :: __private :: extract_field :: < rust_sitter :: WithLeaf < u32 > , _ > (cursor , source , last_idx , "value" , Some (& | v | v . parse () . unwrap ())) } }) } } 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 () ; let mut cursor = node . walk () ; assert ! (cursor . goto_first_child () , "Could not find a child corresponding to any enum branch") ; loop { let node = cursor . node () ; match node . kind () { "Expr_Numbers" => return :: rust_sitter :: __private :: extract_struct_or_variant (node , move | cursor , last_idx | Expr :: Numbers ({ :: rust_sitter :: __private :: extract_field :: < Vec < Number > , _ > (cursor , source , last_idx , "0" , None) })) , _ => 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 () } } # [doc = r" Parse an input string according to the grammar. Returns either any parsing errors that happened, or a"] # [doc = "[`Expr`]"] # [doc = r" instance containing the parsed structured data."] pub fn parse (input : & str) -> core :: result :: Result < Expr , Vec < :: rust_sitter :: errors :: ParseError > > { :: rust_sitter :: __private :: parse :: < Expr > (input , language) } } [INFO] [stdout] ────────────┴─────────────────────────────────────────────────────────────────── [INFO] [stdout] [INFO] [stdout] thread 'tests::enum_with_unamed_vector' panicked at src/lib.rs:450:9: [INFO] [stdout] called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }, "/opt/rustwide/workdir/src/snapshots/rust_sitter_macro__tests__enum_with_unamed_vector.snap.new") [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x700c69892c92 - std::backtrace_rs::backtrace::libunwind::trace::h2d45396358f41939 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x700c69892c92 - std::backtrace_rs::backtrace::trace_unsynchronized::hffcefc0b67f1d6e2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x700c69892c92 - std::sys::backtrace::_print_fmt::hd72f71d23b436b92 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x700c69892c92 - ::fmt::hdcfcb6d4c8489523 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x700c698e3a13 - core::fmt::rt::Argument::fmt::h2c56b3114963061a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x700c698e3a13 - core::fmt::write::h8a494366950f23bb [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x700c69886843 - std::io::default_write_fmt::h7b8824096454f323 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x700c69886843 - std::io::Write::write_fmt::h4e71294925c334d0 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x700c69892ae2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x700c698967a9 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x700c698965de - std::panicking::default_hook::h2c66fc99e962531d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x5fc628408564 - as core::ops::function::Fn>::call::hb6bd65493727d71a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 12: 0x5fc628408564 - test::test_main_with_exit_callback::{{closure}}::h60217ec76a0ece4a [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x700c698972ee - as core::ops::function::Fn>::call::h318e4efb8c1a5689 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 14: 0x700c698972ee - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x700c69896fba - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:706:13 [INFO] [stdout] 16: 0x700c69893199 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x700c69896c4d - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x700c698dec30 - core::panicking::panic_fmt::h62f63d096dd276af [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x700c698df236 - core::result::unwrap_failed::h95bc3f5a607b2c95 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1765:5 [INFO] [stdout] 20: 0x5fc6282b0e91 - core::result::Result::unwrap::h5d76653f7ee86b40 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/result.rs:1167:23 [INFO] [stdout] 21: 0x5fc6282b0e91 - rust_sitter_macro::tests::enum_with_unamed_vector::hc3debc6613cdab1a [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:450:9 [INFO] [stdout] 22: 0x5fc6282afd0d - rust_sitter_macro::tests::enum_with_unamed_vector::{{closure}}::hdce2043914c02d3b [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:449:37 [INFO] [stdout] 23: 0x5fc6282c6266 - core::ops::function::FnOnce::call_once::hd8ce68b1dd49e5e1 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x5fc62840ddcb - core::ops::function::FnOnce::call_once::h1f9474f1347fff52 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x5fc62840ddcb - test::__rust_begin_short_backtrace::ha52ab26e77157f03 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:648:18 [INFO] [stdout] 26: 0x5fc62840cf05 - test::run_test_in_process::{{closure}}::h229c1a11a50b261f [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:74 [INFO] [stdout] 27: 0x5fc62840cf05 - as core::ops::function::FnOnce<()>>::call_once::h78821afbf97b39a9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x5fc62840cf05 - std::panicking::catch_unwind::do_call::h53abf3ed5bd32ba3 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 29: 0x5fc62840cf05 - std::panicking::catch_unwind::h6deb5fe1e91873c9 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 30: 0x5fc62840cf05 - std::panic::catch_unwind::hea0829b6b565654b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x5fc62840cf05 - test::run_test_in_process::hdc44dfecea3db21b [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:671:27 [INFO] [stdout] 32: 0x5fc62840cf05 - test::run_test::{{closure}}::h0364ba59bf23f652 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:592:43 [INFO] [stdout] 33: 0x5fc6283d0b04 - test::run_test::{{closure}}::h32730b304eec05da [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/test/src/lib.rs:622:41 [INFO] [stdout] 34: 0x5fc6283d0b04 - std::sys::backtrace::__rust_begin_short_backtrace::h177cb952fc54ad2c [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h119d903520007597 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x5fc6283d44da - as core::ops::function::FnOnce<()>>::call_once::hab88401d606702a6 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x5fc6283d44da - std::panicking::catch_unwind::do_call::h163fe12cca9901c2 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:589:40 [INFO] [stdout] 38: 0x5fc6283d44da - std::panicking::catch_unwind::he81557d0e17cc1bc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:552:19 [INFO] [stdout] 39: 0x5fc6283d44da - std::panic::catch_unwind::hc2b8e79c20593955 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x5fc6283d44da - std::thread::Builder::spawn_unchecked_::{{closure}}::hfa6b4978e07815cc [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x5fc6283d44da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hddcd7484a13fd793 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x700c6989badf - as core::ops::function::FnOnce>::call_once::h5924238c754de3b8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/alloc/src/boxed.rs:1971:9 [INFO] [stdout] 43: 0x700c6989badf - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8 [INFO] [stdout] at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/sys/pal/unix/thread.rs:107:17 [INFO] [stdout] 44: 0x700c69605aa4 - [INFO] [stdout] 45: 0x700c69692a34 - clone [INFO] [stdout] 46: 0x0 - [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 8.47s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "d0d6c28cc6b7482bba25473db031e228918cc7231b3206600bf117caef8af339", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d0d6c28cc6b7482bba25473db031e228918cc7231b3206600bf117caef8af339", kill_on_drop: false }` [INFO] [stdout] d0d6c28cc6b7482bba25473db031e228918cc7231b3206600bf117caef8af339