[INFO] cloning repository https://github.com/ast-grep/ast-grep [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ast-grep/ast-grep" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fast-grep%2Fast-grep", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fast-grep%2Fast-grep'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a4c37b3baca18a014ad3a68f688f287eabc657c0 [INFO] checking ast-grep/ast-grep against try#23ffd2897cbb44320ca18dfe4d05dbacb37d55e0 for pr-115950 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fast-grep%2Fast-grep" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/ast-grep/ast-grep on toolchain 23ffd2897cbb44320ca18dfe4d05dbacb37d55e0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-2-tc2/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-2-tc2/source/rust-toolchain [INFO] started tweaking git repo https://github.com/ast-grep/ast-grep [INFO] finished tweaking git repo https://github.com/ast-grep/ast-grep [INFO] tweaked toml for git repo https://github.com/ast-grep/ast-grep written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/ast-grep/ast-grep 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" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 399489adbc7aaa3659365c14fe2d0202e05b4acafae4d5439cbf38812d88025a [INFO] running `Command { std: "docker" "start" "-a" "399489adbc7aaa3659365c14fe2d0202e05b4acafae4d5439cbf38812d88025a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "399489adbc7aaa3659365c14fe2d0202e05b4acafae4d5439cbf38812d88025a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "399489adbc7aaa3659365c14fe2d0202e05b4acafae4d5439cbf38812d88025a", kill_on_drop: false }` [INFO] [stdout] 399489adbc7aaa3659365c14fe2d0202e05b4acafae4d5439cbf38812d88025a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ccedbe9067eea96a39fdc0d122a81f8f83d7234817630086be38ad52f34bf93e [INFO] running `Command { std: "docker" "start" "-a" "ccedbe9067eea96a39fdc0d122a81f8f83d7234817630086be38ad52f34bf93e", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling libc v0.2.140 [INFO] [stderr] Compiling proc-macro2 v1.0.63 [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling quote v1.0.29 [INFO] [stderr] Checking memchr v2.6.3 [INFO] [stderr] Checking regex-syntax v0.7.5 [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling syn v1.0.98 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling serde v1.0.167 [INFO] [stderr] Compiling once_cell v1.18.0 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.83 [INFO] [stderr] Checking aho-corasick v1.0.2 [INFO] [stderr] Checking hashbrown v0.14.0 [INFO] [stderr] Compiling bumpalo v3.10.0 [INFO] [stderr] Compiling syn v2.0.23 [INFO] [stderr] Checking equivalent v1.0.0 [INFO] [stderr] Checking indexmap v2.0.0 [INFO] [stderr] Compiling wasm-bindgen v0.2.83 [INFO] [stderr] Checking ryu v1.0.10 [INFO] [stderr] Checking itoa v1.0.3 [INFO] [stderr] Compiling thiserror v1.0.48 [INFO] [stderr] Checking scopeguard v1.1.0 [INFO] [stderr] Compiling serde_json v1.0.107 [INFO] [stderr] Checking bit-vec v0.6.3 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking bit-set v0.5.3 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking regex-automata v0.3.8 [INFO] [stderr] Compiling anyhow v1.0.65 [INFO] [stderr] Compiling lock_api v0.4.10 [INFO] [stderr] Compiling parking_lot_core v0.9.8 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Compiling version_check v0.9.4 [INFO] [stderr] Compiling futures-core v0.3.23 [INFO] [stderr] Checking same-file v1.0.6 [INFO] [stderr] Checking walkdir v2.3.2 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking pin-project-lite v0.2.9 [INFO] [stderr] Checking smallvec v1.9.0 [INFO] [stderr] Checking thread_local v1.1.4 [INFO] [stderr] Compiling slab v0.4.7 [INFO] [stderr] Compiling futures-task v0.3.23 [INFO] [stderr] Checking anstyle v1.0.0 [INFO] [stderr] Checking tinyvec_macros v0.1.0 [INFO] [stderr] Checking unsafe-libyaml v0.2.7 [INFO] [stderr] Checking futures-sink v0.3.23 [INFO] [stderr] Compiling futures-channel v0.3.23 [INFO] [stderr] Checking tinyvec v1.6.0 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Checking matches v0.1.9 [INFO] [stderr] Compiling futures-util v0.3.23 [INFO] [stderr] Checking utf8parse v0.2.1 [INFO] [stderr] Checking anstyle-parse v0.2.0 [INFO] [stderr] Compiling tree-sitter v0.20.10 [INFO] [stderr] Compiling tree-sitter-typescript v0.20.2 [INFO] [stderr] Compiling tree-sitter-javascript v0.20.1 [INFO] [stderr] Compiling tree-sitter-html v0.19.0 [INFO] [stderr] Compiling tree-sitter-css v0.19.0 [INFO] [stderr] Checking regex v1.9.5 [INFO] [stderr] Checking bstr v1.6.0 [INFO] [stderr] Checking unicode-normalization v0.1.21 [INFO] [stderr] Checking globset v0.4.13 [INFO] [stderr] Checking ignore v0.4.20 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling tokio v1.20.1 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.83 [INFO] [stderr] Checking anstyle-query v1.0.0 [INFO] [stderr] Checking futures-io v0.3.23 [INFO] [stderr] Checking percent-encoding v2.1.0 [INFO] [stderr] Checking unicode-bidi v0.3.8 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Checking colorchoice v1.0.0 [INFO] [stderr] Checking form_urlencoded v1.0.1 [INFO] [stderr] Checking anstream v0.5.0 [INFO] [stderr] Checking idna v0.2.3 [INFO] [stderr] Compiling tree-sitter-json v0.19.0 [INFO] [stderr] Compiling ast-grep-tree-sitter-c-sharp v0.20.0 [INFO] [stderr] Compiling serde_derive v1.0.167 [INFO] [stderr] Compiling thiserror-impl v1.0.48 [INFO] [stderr] Compiling tree-sitter-python v0.20.3 [INFO] [stderr] Compiling tree-sitter-dart v0.0.3 [INFO] [stderr] Compiling tree-sitter-scala v0.20.2 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.83 [INFO] [stderr] Compiling tree-sitter-thrift v0.5.0 [INFO] [stderr] Compiling tree-sitter-c v0.20.6 [INFO] [stderr] Compiling tree-sitter-java v0.20.0 [INFO] [stderr] Compiling tree-sitter-kotlin v0.2.11 [INFO] [stderr] Compiling tree-sitter-go v0.19.1 [INFO] [stderr] Compiling tree-sitter-rust v0.20.4 [INFO] [stderr] Compiling tree-sitter-cpp v0.20.3 [INFO] [stderr] Compiling tree-sitter-swift v0.3.6 [INFO] [stderr] Compiling tree-sitter-lua v0.0.19 [INFO] [stderr] Compiling tree-sitter-ruby v0.20.0 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking tracing-core v0.1.29 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Checking bytes v1.2.1 [INFO] [stderr] Compiling async-trait v0.1.57 [INFO] [stderr] Compiling heck v0.4.0 [INFO] [stderr] Checking clap_lex v0.5.0 [INFO] [stderr] Compiling httparse v1.8.0 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Compiling clap_derive v4.4.2 [INFO] [stderr] Checking clap_builder v4.4.2 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.83 [INFO] [stderr] Compiling futures-macro v0.3.23 [INFO] [stderr] Compiling tracing-attributes v0.1.23 [INFO] [stderr] Compiling pin-project-internal v1.0.12 [INFO] [stderr] Compiling serde_repr v0.1.9 [INFO] [stderr] Checking tree-sitter-facade-sg v0.9.2 [INFO] [stderr] Checking ast-grep-core v0.12.1 (/opt/rustwide/workdir/crates/core) [INFO] [stderr] Checking tracing v0.1.36 [INFO] [stderr] Checking pin-project v1.0.12 [INFO] [stderr] Checking serde_yaml v0.9.25 [INFO] [stderr] Checking url v2.2.2 [INFO] [stderr] Checking mio v0.8.4 [INFO] [stderr] Checking bitflags v2.3.3 [INFO] [stderr] Checking tower-service v0.3.2 [INFO] [stderr] Checking either v1.8.1 [INFO] [stderr] Checking tower-layer v0.3.1 [INFO] [stderr] Checking lsp-types v0.94.1 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking ast-grep-config v0.12.1 (/opt/rustwide/workdir/crates/config) [INFO] [stderr] Compiling auto_impl v1.0.1 [INFO] [stderr] Checking futures v0.3.23 [INFO] [stderr] Checking clap v4.4.3 [INFO] [stderr] Checking tokio-util v0.7.3 [INFO] [stderr] Compiling tower-lsp-macros v0.9.0 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking libloading v0.8.0 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Checking unicode-segmentation v1.10.0 [INFO] [stderr] Checking crossterm v0.25.0 [INFO] [stderr] Checking termcolor v1.1.3 [INFO] [stderr] Checking dyn-clone v1.0.11 [INFO] [stderr] Checking newline-converter v0.2.2 [INFO] [stderr] Checking codespan-reporting v0.11.1 [INFO] [stderr] Checking ast-grep-dynamic v0.12.1 (/opt/rustwide/workdir/crates/dynamic) [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking inquire v0.6.2 [INFO] [stderr] Checking clap_complete v4.4.1 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking ansi_term v0.12.1 [INFO] [stderr] Checking similar v2.2.1 [INFO] [stderr] Checking predicates-core v1.0.6 [INFO] [stderr] Compiling crossbeam-utils v0.8.15 [INFO] [stderr] Compiling doc-comment v0.3.3 [INFO] [stderr] Checking remove_dir_all v0.5.3 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Checking float-cmp v0.9.0 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Checking termtree v0.4.0 [INFO] [stderr] Checking normalize-line-endings v0.3.0 [INFO] [stderr] Checking difflib v0.4.0 [INFO] [stderr] Checking predicates-tree v1.0.7 [INFO] [stderr] Checking wait-timeout v0.2.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.14 [INFO] [stderr] Checking predicates v3.0.3 [INFO] [stderr] Compiling semver v1.0.17 [INFO] [stderr] Checking assert_cmd v2.0.12 [INFO] [stderr] Compiling io-lifetimes v1.0.3 [INFO] [stderr] Compiling rayon-core v1.11.0 [INFO] [stderr] Compiling rustix v0.37.6 [INFO] [stderr] Compiling convert_case v0.6.0 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking crossbeam-channel v0.5.7 [INFO] [stderr] Compiling napi-build v2.0.1 [INFO] [stderr] Checking linux-raw-sys v0.3.1 [INFO] [stderr] Checking half v1.8.2 [INFO] [stderr] Checking plotters-backend v0.3.4 [INFO] [stderr] Checking ast-grep-language v0.12.1 (/opt/rustwide/workdir/crates/language) [INFO] [stderr] Checking ciborium-io v0.2.0 [INFO] [stderr] Compiling ast-grep-napi v0.12.1 (/opt/rustwide/workdir/crates/napi) [INFO] [stderr] Checking ciborium-ll v0.2.0 [INFO] [stderr] Checking plotters-svg v0.3.3 [INFO] [stderr] Compiling ctor v0.2.0 [INFO] [stderr] Checking toml_datetime v0.6.3 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking winnow v0.5.0 [INFO] [stderr] Checking napi-sys v2.2.3 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Checking napi v2.13.3 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking is-terminal v0.4.6 [INFO] [stderr] Checking ciborium v0.2.0 [INFO] [stderr] Checking plotters v0.3.4 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Checking toml_edit v0.20.0 [INFO] [stderr] Checking oorandom v11.1.3 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking xtask v0.0.0 (/opt/rustwide/workdir/xtask) [INFO] [stderr] Compiling napi-derive-backend v1.0.52 [INFO] [stderr] Checking tower-lsp v0.20.0 [INFO] [stderr] Checking benches v0.12.1 (/opt/rustwide/workdir/benches) [INFO] [stderr] Compiling napi-derive v2.13.0 [INFO] [stderr] Checking ast-grep-lsp v0.12.1 (/opt/rustwide/workdir/crates/lsp) [INFO] [stderr] Checking ast-grep v0.12.1 (/opt/rustwide/workdir/crates/cli) [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/cloud_print.rs:148:19 [INFO] [stdout] | [INFO] [stdout] 148 | let matches = grep.root().find_all(&rule.matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 149 | let file = SimpleFile::new(Cow::Borrowed("test.tsx"), &src); [INFO] [stdout] 150 | printer.print_rule(matches, file, &rule).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 148 ~ let binding = grep.root(); [INFO] [stdout] 149 ~ let matches = binding.find_all(&rule.matcher); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 51 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:68:19 [INFO] [stdout] | [INFO] [stdout] 68 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 69 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:106:19 [INFO] [stdout] | [INFO] [stdout] 106 | let matches = grep.root().find_all(&matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 107 | printer.print_rule(matches, file, &rule).expect("test only"); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:155:19 [INFO] [stdout] | [INFO] [stdout] 155 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 156 | let diffs = matches.map(|n| Diff::generate(n, &pattern, &fixer)); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | let matches = grep.root().find_all("Some($A)"); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 172 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 171 ~ let binding = grep.root(); [INFO] [stdout] 172 ~ let matches = binding.find_all("Some($A)"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | let matches = grep.root().find_all("Some($A)"); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 197 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 196 ~ let binding = grep.root(); [INFO] [stdout] 197 ~ let matches = binding.find_all("Some($A)"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:237:19 [INFO] [stdout] | [INFO] [stdout] 237 | let matches = grep.root().find_all(&matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 238 | let diffs = matches.map(|n| (Diff::generate(n, &pattern, fixer), &rule)); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/colored_print/test.rs:265:21 [INFO] [stdout] | [INFO] [stdout] 265 | let matches = grep.root().find_all("Some($A)"); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 266 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/run.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | let matches = grep.root().find_all(matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 270 | printer.print_matches(matches, path) [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 265 ~ let binding = grep.root(); [INFO] [stdout] 266 ~ let matches = binding.find_all(matcher); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:413:21 [INFO] [stdout] | [INFO] [stdout] 413 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 414 | printer.before_print().unwrap(); [INFO] [stdout] 415 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:430:21 [INFO] [stdout] | [INFO] [stdout] 430 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 431 | let fixer = Fixer::try_new(replace, &lang).expect("should work"); [INFO] [stdout] 432 | let diffs = matches.map(|m| Diff::generate(m, &pattern, &fixer)); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:474:21 [INFO] [stdout] | [INFO] [stdout] 474 | let matches = grep.root().find_all(&rule.matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 477 | printer.print_rule(matches, file, &rule).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:491:19 [INFO] [stdout] | [INFO] [stdout] 491 | let matches = grep.root().find_all("console.log($A)"); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 492 | printer.before_print().unwrap(); [INFO] [stdout] 493 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 491 ~ let binding = grep.root(); [INFO] [stdout] 492 ~ let matches = binding.find_all("console.log($A)"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:510:19 [INFO] [stdout] | [INFO] [stdout] 510 | let matches = grep.root().find_all("console.log($$$A)"); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 511 | printer.before_print().unwrap(); [INFO] [stdout] 512 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 510 ~ let binding = grep.root(); [INFO] [stdout] 511 ~ let matches = binding.find_all("console.log($$$A)"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:527:21 [INFO] [stdout] | [INFO] [stdout] 527 | let matches = grep.root().find_all(pattern); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 528 | printer.before_print().unwrap(); [INFO] [stdout] 529 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/print/json_print.rs:556:19 [INFO] [stdout] | [INFO] [stdout] 556 | let matches = grep.root().find_all(&rule.matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 557 | printer.before_print().unwrap(); [INFO] [stdout] 558 | printer.print_matches(matches, "test.tsx".as_ref()).unwrap(); [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 556 ~ let binding = grep.root(); [INFO] [stdout] 557 ~ let matches = binding.find_all(&rule.matcher); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> crates/cli/src/run.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | let matches = grep.root().find_all(matcher); [INFO] [stdout] | ^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 270 | printer.print_matches(matches, path) [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 265 ~ let binding = grep.root(); [INFO] [stdout] 266 ~ let matches = binding.find_all(matcher); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0716`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ast-grep` (lib) due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error: aborting due to 17 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0716`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ast-grep` (lib test) due to 18 previous errors [INFO] running `Command { std: "docker" "inspect" "ccedbe9067eea96a39fdc0d122a81f8f83d7234817630086be38ad52f34bf93e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ccedbe9067eea96a39fdc0d122a81f8f83d7234817630086be38ad52f34bf93e", kill_on_drop: false }` [INFO] [stdout] ccedbe9067eea96a39fdc0d122a81f8f83d7234817630086be38ad52f34bf93e