[INFO] updating cached repository https://github.com/dhoepelman/rust-pong [INFO] running `"git" "-c" "credential.helper=" "-c" "credential.helper=/big/crater/work/cargo-home/bin/git-credential-null" "-c" "remote.origin.fetch=refs/heads/*:refs/heads/*" "fetch" "origin" "--force" "--prune"` [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] c137445cb4b13ef72b217eb3bb5075ee9e1d1ecc [INFO] testing dhoepelman/rust-pong against beta-2019-09-28 for beta-1.39-1 [INFO] running `"git" "clone" "work/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhoepelman%2Frust-pong" "work/builds/worker-7/source"` [INFO] [stderr] Cloning into 'work/builds/worker-7/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/dhoepelman/rust-pong on toolchain beta-2019-09-28 [INFO] running `"/big/crater/work/cargo-home/bin/cargo" "+beta-2019-09-28" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started tweaking git repo https://github.com/dhoepelman/rust-pong [INFO] finished tweaking git repo https://github.com/dhoepelman/rust-pong [INFO] tweaked toml for git repo https://github.com/dhoepelman/rust-pong written to work/builds/worker-7/source/Cargo.toml [INFO] crate git repo https://github.com/dhoepelman/rust-pong already has a lockfile, it will not be regenerated [INFO] running `"/big/crater/work/cargo-home/bin/cargo" "+beta-2019-09-28" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"docker" "create" "-v" "/big/crater/work/builds/worker-7/target:/opt/rustwide/target:rw,Z" "-v" "/big/crater/work/builds/worker-7/source:/opt/rustwide/workdir:ro,Z" "-v" "/big/crater/work/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/big/crater/work/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2019-09-28" "build" "--frozen"` [INFO] [stdout] 7d1e8f940c882bcfa89e190b377092ad3e8ca823c3c874a000fce26695494a68 [INFO] running `"docker" "start" "-a" "7d1e8f940c882bcfa89e190b377092ad3e8ca823c3c874a000fce26695494a68"` [INFO] [stderr] Compiling gmp-mpfr-sys v1.1.10 [INFO] [stderr] Compiling rug v0.6.0 [INFO] [stderr] Compiling pong v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] warning: unused import: `std::io` [INFO] [stderr] --> src/main.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use std::io; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `rand::Rng` [INFO] [stderr] --> src/main.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use rand::Rng; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::cmp::Ordering` [INFO] [stderr] --> src/main.rs:5:5 [INFO] [stderr] | [INFO] [stderr] 5 | use std::cmp::Ordering; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Assign` [INFO] [stderr] --> src/main.rs:6:11 [INFO] [stderr] | [INFO] [stderr] 6 | use rug::{Assign, Integer}; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `*cache` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/main.rs:57:22 [INFO] [stderr] | [INFO] [stderr] 50 | fn fib(n: usize, cache: &mut Vec) -> &Integer { [INFO] [stderr] | - let's call the lifetime of this reference `'1` [INFO] [stderr] 51 | match cache.get(n) { [INFO] [stderr] | ----- immutable borrow occurs here [INFO] [stderr] 52 | Some(n) => n, [INFO] [stderr] | - returning this value requires that `*cache` is borrowed for `'1` [INFO] [stderr] ... [INFO] [stderr] 57 | m => fib(m-2, cache).clone() + fib(m - 1, cache).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `*cache` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/main.rs:57:48 [INFO] [stderr] | [INFO] [stderr] 50 | fn fib(n: usize, cache: &mut Vec) -> &Integer { [INFO] [stderr] | - let's call the lifetime of this reference `'1` [INFO] [stderr] 51 | match cache.get(n) { [INFO] [stderr] | ----- immutable borrow occurs here [INFO] [stderr] 52 | Some(n) => n, [INFO] [stderr] | - returning this value requires that `*cache` is borrowed for `'1` [INFO] [stderr] ... [INFO] [stderr] 57 | m => fib(m-2, cache).clone() + fib(m - 1, cache).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `*cache` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/main.rs:59:13 [INFO] [stderr] | [INFO] [stderr] 50 | fn fib(n: usize, cache: &mut Vec) -> &Integer { [INFO] [stderr] | - let's call the lifetime of this reference `'1` [INFO] [stderr] 51 | match cache.get(n) { [INFO] [stderr] | ----- immutable borrow occurs here [INFO] [stderr] 52 | Some(n) => n, [INFO] [stderr] | - returning this value requires that `*cache` is borrowed for `'1` [INFO] [stderr] ... [INFO] [stderr] 59 | cache.push(res); [INFO] [stderr] | ^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] [INFO] [stderr] error[E0515]: cannot return reference to temporary value [INFO] [stderr] --> src/main.rs:60:20 [INFO] [stderr] | [INFO] [stderr] 60 | return &cache[n].clone(); [INFO] [stderr] | ^---------------- [INFO] [stderr] | || [INFO] [stderr] | |temporary value created here [INFO] [stderr] | returns a reference to data owned by the current function [INFO] [stderr] [INFO] [stderr] error: aborting due to 4 previous errors [INFO] [stderr] [INFO] [stderr] Some errors have detailed explanations: E0502, E0515. [INFO] [stderr] For more information about an error, try `rustc --explain E0502`. [INFO] [stderr] error: could not compile `pong`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "7d1e8f940c882bcfa89e190b377092ad3e8ca823c3c874a000fce26695494a68"` [INFO] running `"docker" "rm" "-f" "7d1e8f940c882bcfa89e190b377092ad3e8ca823c3c874a000fce26695494a68"` [INFO] [stdout] 7d1e8f940c882bcfa89e190b377092ad3e8ca823c3c874a000fce26695494a68