[INFO] cloning repository https://github.com/Benoy515/Rust-Neural-Network
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Benoy515/Rust-Neural-Network" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBenoy515%2FRust-Neural-Network", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBenoy515%2FRust-Neural-Network'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 01b01296df3c52c5f2ba43f13ae055f93150d178
[INFO] checking Benoy515/Rust-Neural-Network against master#779e19d8baa3e3625bd4fc5c85cbb2ad47b43155 for pr-147589-1
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBenoy515%2FRust-Neural-Network" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/Benoy515/Rust-Neural-Network
[INFO] finished tweaking git repo https://github.com/Benoy515/Rust-Neural-Network
[INFO] tweaked toml for git repo https://github.com/Benoy515/Rust-Neural-Network written to /workspace/builds/worker-1-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/Benoy515/Rust-Neural-Network on toolchain 779e19d8baa3e3625bd4fc5c85cbb2ad47b43155
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+779e19d8baa3e3625bd4fc5c85cbb2ad47b43155" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/Benoy515/Rust-Neural-Network 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" "+779e19d8baa3e3625bd4fc5c85cbb2ad47b43155" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded ndarray-rand v0.14.0
[INFO] [stderr]   Downloaded libm v0.2.6
[INFO] [stderr]   Downloaded blas-src v0.2.1
[INFO] [stderr]   Downloaded openblas-src v0.6.1
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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" "+779e19d8baa3e3625bd4fc5c85cbb2ad47b43155" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] e7d1ab416669a4eb55c046ca080f42306ad956776765dff2e588837349978bae
[INFO] running `Command { std: "docker" "start" "-a" "e7d1ab416669a4eb55c046ca080f42306ad956776765dff2e588837349978bae", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "e7d1ab416669a4eb55c046ca080f42306ad956776765dff2e588837349978bae", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e7d1ab416669a4eb55c046ca080f42306ad956776765dff2e588837349978bae", kill_on_drop: false }`
[INFO] [stdout] e7d1ab416669a4eb55c046ca080f42306ad956776765dff2e588837349978bae
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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=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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+779e19d8baa3e3625bd4fc5c85cbb2ad47b43155" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] cc6fa851e30786508791ca3a22e3ab56c22b2fadba58eb18680031880883cacf
[INFO] running `Command { std: "docker" "start" "-a" "cc6fa851e30786508791ca3a22e3ab56c22b2fadba58eb18680031880883cacf", kill_on_drop: false }`
[INFO] [stderr]    Compiling libc v0.2.142
[INFO] [stderr]    Compiling libm v0.2.6
[INFO] [stderr]    Compiling num-traits v0.2.15
[INFO] [stderr]    Compiling num-integer v0.1.45
[INFO] [stderr]     Checking rawpointer v0.2.1
[INFO] [stderr]    Compiling openblas-src v0.6.1
[INFO] [stderr]     Checking matrixmultiply v0.3.2
[INFO] [stderr]     Checking blas-src v0.2.1
[INFO] [stderr]     Checking getrandom v0.2.9
[INFO] [stderr]     Checking cblas-sys v0.1.4
[INFO] [stderr]     Checking num-complex v0.4.3
[INFO] [stderr]     Checking rand_core v0.6.4
[INFO] [stderr]     Checking rand_chacha v0.3.1
[INFO] [stderr]     Checking rand v0.8.5
[INFO] [stderr]     Checking ndarray v0.15.6
[INFO] [stderr]     Checking rand_distr v0.4.3
[INFO] [stderr]     Checking ndarray-rand v0.14.0
[INFO] [stderr]     Checking neural_network v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `flate2`
[INFO] [stdout]   --> src/main.rs:13:22
[INFO] [stdout]    |
[INFO] [stdout] 13 |         let mut gz = flate2::GzDecoder::new(f);
[INFO] [stdout]    |                      ^^^^^^ use of unresolved module or unlinked crate `flate2`
[INFO] [stdout]    |
[INFO] [stdout]    = help: if you wanted to use a crate named `flate2`, use `cargo add flate2` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `flate2`
[INFO] [stdout]   --> src/main.rs:13:22
[INFO] [stdout]    |
[INFO] [stdout] 13 |         let mut gz = flate2::GzDecoder::new(f);
[INFO] [stdout]    |                      ^^^^^^ use of unresolved module or unlinked crate `flate2`
[INFO] [stdout]    |
[INFO] [stdout]    = help: if you wanted to use a crate named `flate2`, use `cargo add flate2` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `File` in this scope
[INFO] [stdout]   --> src/main.rs:12:16
[INFO] [stdout]    |
[INFO] [stdout] 12 |     fn new(f: &File) -> Result<MnistData, std::io::Error> {
[INFO] [stdout]    |                ^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Cursor`
[INFO] [stdout]   --> src/main.rs:16:21
[INFO] [stdout]    |
[INFO] [stdout] 16 |         let mut r = Cursor::new(&contents);
[INFO] [stdout]    |                     ^^^^^^ use of undeclared type `Cursor`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing one of these structs
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::btree_map::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::btree_set::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::linked_list::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::io::Cursor;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:18:41
[INFO] [stdout]    |
[INFO] [stdout] 18 |         let magic_number = r.read_i32::<BigEndian>()?;
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:25:41
[INFO] [stdout]    |
[INFO] [stdout] 25 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:28:41
[INFO] [stdout]    |
[INFO] [stdout] 28 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:29:41
[INFO] [stdout]    |
[INFO] [stdout] 29 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:30:41
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `File`
[INFO] [stdout]   --> src/main.rs:50:40
[INFO] [stdout]    |
[INFO] [stdout] 50 |     let label_data = &MnistData::new(&(File::open(filename))?)?;
[INFO] [stdout]    |                                        ^^^^ use of undeclared type `File`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `File`
[INFO] [stdout]   --> src/main.rs:52:41
[INFO] [stdout]    |
[INFO] [stdout] 52 |     let images_data = &MnistData::new(&(File::open(filename))?)?;
[INFO] [stdout]    |                                         ^^^^ use of undeclared type `File`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `File` in this scope
[INFO] [stdout]   --> src/main.rs:12:16
[INFO] [stdout]    |
[INFO] [stdout] 12 |     fn new(f: &File) -> Result<MnistData, std::io::Error> {
[INFO] [stdout]    |                ^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Cursor`
[INFO] [stdout]   --> src/main.rs:16:21
[INFO] [stdout]    |
[INFO] [stdout] 16 |         let mut r = Cursor::new(&contents);
[INFO] [stdout]    |                     ^^^^^^ use of undeclared type `Cursor`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing one of these structs
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::btree_map::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::btree_set::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::collections::linked_list::Cursor;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::io::Cursor;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:18:41
[INFO] [stdout]    |
[INFO] [stdout] 18 |         let magic_number = r.read_i32::<BigEndian>()?;
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:25:41
[INFO] [stdout]    |
[INFO] [stdout] 25 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:28:41
[INFO] [stdout]    |
[INFO] [stdout] 28 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:29:41
[INFO] [stdout]    |
[INFO] [stdout] 29 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `BigEndian` in this scope
[INFO] [stdout]   --> src/main.rs:30:41
[INFO] [stdout]    |
[INFO] [stdout] 30 |                 sizes.push(r.read_i32::<BigEndian>()?);
[INFO] [stdout]    |                                         ^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 11 | impl<BigEndian> MnistData {
[INFO] [stdout]    |     +++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `File`
[INFO] [stdout]   --> src/main.rs:50:40
[INFO] [stdout]    |
[INFO] [stdout] 50 |     let label_data = &MnistData::new(&(File::open(filename))?)?;
[INFO] [stdout]    |                                        ^^^^ use of undeclared type `File`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `File`
[INFO] [stdout]   --> src/main.rs:52:41
[INFO] [stdout]    |
[INFO] [stdout] 52 |     let images_data = &MnistData::new(&(File::open(filename))?)?;
[INFO] [stdout]    |                                         ^^^^ use of undeclared type `File`
[INFO] [stdout]    |
[INFO] [stdout] help: consider importing this struct
[INFO] [stdout]    |
[INFO] [stdout]  1 + use std::fs::File;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `layer_output`
[INFO] [stdout]    --> src/main.rs:112:24
[INFO] [stdout]     |
[INFO] [stdout] 108 |     let mut layer_output = input.to_owned();
[INFO] [stdout]     |         ---------------- move occurs because `layer_output` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 111 |     for (i, weight) in weights.iter().skip(1).enumerate() {
[INFO] [stdout]     |     ----------------------------------------------------- inside of this loop
[INFO] [stdout] 112 |         layer_output = layer_output.t().dot(layer_weights);
[INFO] [stdout]     |                        ^^^^^^^^^^^^ value borrowed here after move
[INFO] [stdout] ...
[INFO] [stdout] 115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]     |                                                         -------------------- `layer_output` moved due to this method call, in previous iteration of loop
[INFO] [stdout]     |
[INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior
[INFO] [stdout]     |
[INFO] [stdout] 115 |         gradients[weights.len() - i - 1] = layer_output.clone().insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]     |                                                        ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `layer_gradient`
[INFO] [stdout]     --> src/main.rs:124:66
[INFO] [stdout]      |
[INFO] [stdout]  110 |     let mut layer_gradient = output_gradient.to_owned();
[INFO] [stdout]      |         ------------------ move occurs because `layer_gradient` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>`, which does not implement the `Copy` trait
[INFO] [stdout]  111 |     for (i, weight) in weights.iter().skip(1).enumerate() {
[INFO] [stdout]      |     ----------------------------------------------------- inside of this loop
[INFO] [stdout] ...
[INFO] [stdout]  115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]      |                                                                                                      -------------------- `layer_gradient` moved due to this method call, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout]  124 |     let input_gradient = layer_output.mapv(sigmoid_derivative) * layer_gradient.dot(&weights[0].t());
[INFO] [stdout]      |                                                                  ^^^^^^^^^^^^^^ value borrowed here after move
[INFO] [stdout]      |
[INFO] [stdout] note: `ndarray::impl_methods::<impl ArrayBase<S, D>>::insert_axis` takes ownership of the receiver `self`, which moves `layer_gradient`
[INFO] [stdout]     --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.15.6/src/impl_methods.rs:2317:24
[INFO] [stdout]      |
[INFO] [stdout] 2317 |     pub fn insert_axis(self, axis: Axis) -> ArrayBase<S, D::Larger> {
[INFO] [stdout]      |                        ^^^^
[INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior
[INFO] [stdout]      |
[INFO] [stdout]  115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.clone().insert_axis(Axis(0)));
[INFO] [stdout]      |                                                                                                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `*weights` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/main.rs:128:31
[INFO] [stdout]     |
[INFO] [stdout] 128 |     for (weight, gradient) in weights.iter_mut().zip(gradients.iter()) {
[INFO] [stdout]     |                               ^^^^^^^ `weights` is a `&` reference, so the data it refers to cannot be borrowed as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be a mutable reference
[INFO] [stdout]     |
[INFO] [stdout]  97 |     weights: &mut Vec<Array2<f64>>,
[INFO] [stdout]     |               +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `*weight` which is behind a mutable reference
[INFO] [stdout]    --> src/main.rs:129:19
[INFO] [stdout]     |
[INFO] [stdout] 129 |         *weight = *weight - learning_rate * gradient;
[INFO] [stdout]     |                   ^^^^^^^ move occurs because `*weight` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>`, which does not implement the `Copy` trait
[INFO] [stdout]     |
[INFO] [stdout] help: consider cloning the value if the performance cost is acceptable
[INFO] [stdout]     |
[INFO] [stdout] 129 -         *weight = *weight - learning_rate * gradient;
[INFO] [stdout] 129 +         *weight = weight.clone() - learning_rate * gradient;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0382, E0412, E0433, E0507, E0596.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `neural_network` (bin "neural_network") due to 14 previous errors
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0382]: borrow of moved value: `layer_output`
[INFO] [stdout]    --> src/main.rs:112:24
[INFO] [stdout]     |
[INFO] [stdout] 108 |     let mut layer_output = input.to_owned();
[INFO] [stdout]     |         ---------------- move occurs because `layer_output` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 111 |     for (i, weight) in weights.iter().skip(1).enumerate() {
[INFO] [stdout]     |     ----------------------------------------------------- inside of this loop
[INFO] [stdout] 112 |         layer_output = layer_output.t().dot(layer_weights);
[INFO] [stdout]     |                        ^^^^^^^^^^^^ value borrowed here after move
[INFO] [stdout] ...
[INFO] [stdout] 115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]     |                                                         -------------------- `layer_output` moved due to this method call, in previous iteration of loop
[INFO] [stdout]     |
[INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior
[INFO] [stdout]     |
[INFO] [stdout] 115 |         gradients[weights.len() - i - 1] = layer_output.clone().insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]     |                                                        ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `layer_gradient`
[INFO] [stdout]     --> src/main.rs:124:66
[INFO] [stdout]      |
[INFO] [stdout]  110 |     let mut layer_gradient = output_gradient.to_owned();
[INFO] [stdout]      |         ------------------ move occurs because `layer_gradient` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>`, which does not implement the `Copy` trait
[INFO] [stdout]  111 |     for (i, weight) in weights.iter().skip(1).enumerate() {
[INFO] [stdout]      |     ----------------------------------------------------- inside of this loop
[INFO] [stdout] ...
[INFO] [stdout]  115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.insert_axis(Axis(0)));
[INFO] [stdout]      |                                                                                                      -------------------- `layer_gradient` moved due to this method call, in previous iteration of loop
[INFO] [stdout] ...
[INFO] [stdout]  124 |     let input_gradient = layer_output.mapv(sigmoid_derivative) * layer_gradient.dot(&weights[0].t());
[INFO] [stdout]      |                                                                  ^^^^^^^^^^^^^^ value borrowed here after move
[INFO] [stdout]      |
[INFO] [stdout] note: `ndarray::impl_methods::<impl ArrayBase<S, D>>::insert_axis` takes ownership of the receiver `self`, which moves `layer_gradient`
[INFO] [stdout]     --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.15.6/src/impl_methods.rs:2317:24
[INFO] [stdout]      |
[INFO] [stdout] 2317 |     pub fn insert_axis(self, axis: Axis) -> ArrayBase<S, D::Larger> {
[INFO] [stdout]      |                        ^^^^
[INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior
[INFO] [stdout]      |
[INFO] [stdout]  115 |         gradients[weights.len() - i - 1] = layer_output.insert_axis(Axis(0)).t().dot(&layer_gradient.clone().insert_axis(Axis(0)));
[INFO] [stdout]      |                                                                                                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `*weights` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/main.rs:128:31
[INFO] [stdout]     |
[INFO] [stdout] 128 |     for (weight, gradient) in weights.iter_mut().zip(gradients.iter()) {
[INFO] [stdout]     |                               ^^^^^^^ `weights` is a `&` reference, so the data it refers to cannot be borrowed as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be a mutable reference
[INFO] [stdout]     |
[INFO] [stdout]  97 |     weights: &mut Vec<Array2<f64>>,
[INFO] [stdout]     |               +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0507]: cannot move out of `*weight` which is behind a mutable reference
[INFO] [stdout]    --> src/main.rs:129:19
[INFO] [stdout]     |
[INFO] [stdout] 129 |         *weight = *weight - learning_rate * gradient;
[INFO] [stdout]     |                   ^^^^^^^ move occurs because `*weight` has type `ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>`, which does not implement the `Copy` trait
[INFO] [stdout]     |
[INFO] [stdout] help: consider cloning the value if the performance cost is acceptable
[INFO] [stdout]     |
[INFO] [stdout] 129 -         *weight = *weight - learning_rate * gradient;
[INFO] [stdout] 129 +         *weight = weight.clone() - learning_rate * gradient;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0382, E0412, E0433, E0507, E0596.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `neural_network` (bin "neural_network" test) due to 14 previous errors
[INFO] running `Command { std: "docker" "inspect" "cc6fa851e30786508791ca3a22e3ab56c22b2fadba58eb18680031880883cacf", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "cc6fa851e30786508791ca3a22e3ab56c22b2fadba58eb18680031880883cacf", kill_on_drop: false }`
[INFO] [stdout] cc6fa851e30786508791ca3a22e3ab56c22b2fadba58eb18680031880883cacf
