[INFO] cloning repository https://github.com/xymeng16/rustkv [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/xymeng16/rustkv" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxymeng16%2Frustkv", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxymeng16%2Frustkv'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8f9c1bedd4a6baf71561686cb97dbb4c3bfe26bd [INFO] testing xymeng16/rustkv against master#b70888601af92f6cdc0364abab3446e418b91d36 for pr-86479 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxymeng16%2Frustkv" "/workspace/builds/worker-1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/xymeng16/rustkv on toolchain b70888601af92f6cdc0364abab3446e418b91d36 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+b70888601af92f6cdc0364abab3446e418b91d36" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/xymeng16/rustkv [INFO] finished tweaking git repo https://github.com/xymeng16/rustkv [INFO] tweaked toml for git repo https://github.com/xymeng16/rustkv written to /workspace/builds/worker-1/source/Cargo.toml [INFO] crate git repo https://github.com/xymeng16/rustkv already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+b70888601af92f6cdc0364abab3446e418b91d36" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+b70888601af92f6cdc0364abab3446e418b91d36" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d7931283b21457dfb642eda2cfbf6bb4ab9ec165b063795b23e1799212ab0556 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "d7931283b21457dfb642eda2cfbf6bb4ab9ec165b063795b23e1799212ab0556", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d7931283b21457dfb642eda2cfbf6bb4ab9ec165b063795b23e1799212ab0556", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d7931283b21457dfb642eda2cfbf6bb4ab9ec165b063795b23e1799212ab0556", kill_on_drop: false }` [INFO] [stdout] d7931283b21457dfb642eda2cfbf6bb4ab9ec165b063795b23e1799212ab0556 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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" "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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+b70888601af92f6cdc0364abab3446e418b91d36" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0af1b132717795b0d1dbf456a1a3f18154f93acbecb9f549f05363b101c094ad [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "0af1b132717795b0d1dbf456a1a3f18154f93acbecb9f549f05363b101c094ad", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.28 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling libc v0.2.98 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling syn v1.0.74 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling serde_derive v1.0.126 [INFO] [stderr] Compiling serde v1.0.126 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling unicode-width v0.1.8 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling gimli v0.24.0 [INFO] [stderr] Compiling vec_map v0.8.2 [INFO] [stderr] Compiling failure_derive v0.1.8 [INFO] [stderr] Compiling ppv-lite86 v0.2.10 [INFO] [stderr] Compiling strsim v0.8.0 [INFO] [stderr] Compiling ansi_term v0.11.0 [INFO] [stderr] Compiling once_cell v1.8.0 [INFO] [stderr] Compiling os_str_bytes v2.4.0 [INFO] [stderr] Compiling ahash v0.7.4 [INFO] [stderr] Compiling backtrace v0.3.60 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling textwrap v0.12.1 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling crc32fast v1.2.1 [INFO] [stderr] Compiling object v0.25.3 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Compiling time v0.1.43 [INFO] [stderr] Compiling getrandom v0.2.3 [INFO] [stderr] Compiling colored v1.9.3 [INFO] [stderr] Compiling clap v2.33.3 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling chrono v0.4.19 [INFO] [stderr] Compiling addr2line v0.15.2 [INFO] [stderr] Compiling simple_logger v1.11.0 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling synstructure v0.12.5 [INFO] [stderr] Compiling structopt-derive v0.4.15 [INFO] [stderr] Compiling clap_derive v3.0.0-beta.2 [INFO] [stderr] Compiling failure v0.1.8 [INFO] [stderr] Compiling structopt v0.3.22 [INFO] [stderr] Compiling clap v3.0.0-beta.2 [INFO] [stderr] Compiling toml v0.5.8 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Compiling bson v2.0.0-beta.2 [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stderr] Compiling function_name-proc-macro v0.2.0 [INFO] [stderr] Compiling function_name v0.2.0 [INFO] [stderr] Compiling rustkv v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `OpenOptions` [INFO] [stdout] --> src/lib.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | use std::fs::{File, OpenOptions}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::Utc` [INFO] [stdout] --> src/lib.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use chrono::Utc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `function_name::named` [INFO] [stdout] --> src/lib.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use function_name::named; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index_file` [INFO] [stdout] --> src/lib.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | let index_file = File::create(INDEX_FILENAME)?; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_index_file` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `logfiles` [INFO] [stdout] --> src/lib.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 92 | let active_log_file = logfiles[0].borrow_mut(); [INFO] [stdout] | -------- `logfiles` is borrowed here [INFO] [stdout] 93 | / Ok(KvStore { [INFO] [stdout] 94 | | map: HashMap::new(), [INFO] [stdout] 95 | | logfiles, [INFO] [stdout] 96 | | write_buf: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 100 | | active_log_file, [INFO] [stdout] 101 | | }) [INFO] [stdout] | |__________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `logfiles` because it is borrowed [INFO] [stdout] --> src/lib.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 76 | impl<'a> KvStore<'a> { [INFO] [stdout] | -- lifetime `'a` defined here [INFO] [stdout] ... [INFO] [stdout] 92 | let active_log_file = logfiles[0].borrow_mut(); [INFO] [stdout] | -------- borrow of `logfiles` occurs here [INFO] [stdout] 93 | / Ok(KvStore { [INFO] [stdout] 94 | | map: HashMap::new(), [INFO] [stdout] 95 | | logfiles, [INFO] [stdout] | | ^^^^^^^^ move out of `logfiles` occurs here [INFO] [stdout] 96 | | write_buf: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 100 | | active_log_file, [INFO] [stdout] 101 | | }) [INFO] [stdout] | |__________- returning this value requires that `logfiles` is borrowed for `'a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/lib.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | / Ok(KvStore { [INFO] [stdout] 119 | | map: HashMap::new(), [INFO] [stdout] 120 | | logfiles: Vec::new(), [INFO] [stdout] 121 | | write_buf: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 125 | | active_log_file: &mut KvStoreLogFile::create_or_open(1, "a.bson")?, [INFO] [stdout] | | -------------------------------------------- temporary value created here [INFO] [stdout] 126 | | }) [INFO] [stdout] | |__________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `file` [INFO] [stdout] --> src/logptr.rs:103:31 [INFO] [stdout] | [INFO] [stdout] 93 | let file = OpenOptions::new() [INFO] [stdout] | ---- move occurs because `file` has type `File`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 99 | file, [INFO] [stdout] | ---- value moved here [INFO] [stdout] ... [INFO] [stdout] 103 | current_position: file.metadata().unwrap().len(), [INFO] [stdout] | ^^^^ value borrowed here after move [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/logptr.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | let mut n = self.write_buf.len(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors; 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0382, E0505, E0515. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rustkv` due to 5 previous errors; 5 warnings emitted [INFO] running `Command { std: "docker" "inspect" "0af1b132717795b0d1dbf456a1a3f18154f93acbecb9f549f05363b101c094ad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0af1b132717795b0d1dbf456a1a3f18154f93acbecb9f549f05363b101c094ad", kill_on_drop: false }` [INFO] [stdout] 0af1b132717795b0d1dbf456a1a3f18154f93acbecb9f549f05363b101c094ad