[INFO] cloning repository https://github.com/richwandell/rust-algorithms [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/richwandell/rust-algorithms" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frichwandell%2Frust-algorithms", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frichwandell%2Frust-algorithms'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 58cbef2915c323c7a57c4068b5f52094516e952e [INFO] checking richwandell/rust-algorithms against try#7df376b035b3d12ff0386ad8b45b76dbe020257b for pr-142712 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frichwandell%2Frust-algorithms" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/richwandell/rust-algorithms [INFO] finished tweaking git repo https://github.com/richwandell/rust-algorithms [INFO] tweaked toml for git repo https://github.com/richwandell/rust-algorithms written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/richwandell/rust-algorithms on toolchain 7df376b035b3d12ff0386ad8b45b76dbe020257b [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+7df376b035b3d12ff0386ad8b45b76dbe020257b" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/richwandell/rust-algorithms 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" "+7df376b035b3d12ff0386ad8b45b76dbe020257b" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded noisy_float v0.1.11 [INFO] [stderr] Downloaded ndarray-rand v0.11.0 [INFO] [stderr] Downloaded rand_pcg v0.2.0 [INFO] [stderr] Downloaded ndarray-stats v0.3.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+7df376b035b3d12ff0386ad8b45b76dbe020257b" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c60bc54a25b53a23a172171c624c4f1ac56b1a454d5d6a74aac656bcdfce32da [INFO] running `Command { std: "docker" "start" "-a" "c60bc54a25b53a23a172171c624c4f1ac56b1a454d5d6a74aac656bcdfce32da", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c60bc54a25b53a23a172171c624c4f1ac56b1a454d5d6a74aac656bcdfce32da", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c60bc54a25b53a23a172171c624c4f1ac56b1a454d5d6a74aac656bcdfce32da", kill_on_drop: false }` [INFO] [stdout] c60bc54a25b53a23a172171c624c4f1ac56b1a454d5d6a74aac656bcdfce32da [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+7df376b035b3d12ff0386ad8b45b76dbe020257b" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] cfa0fea611fca31a5fcf44159510898432bb933fc888bac12f2df372ac6e884e [INFO] running `Command { std: "docker" "start" "-a" "cfa0fea611fca31a5fcf44159510898432bb933fc888bac12f2df372ac6e884e", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v0.1.6 [INFO] [stderr] Compiling libc v0.2.62 [INFO] [stderr] Compiling getrandom v0.1.12 [INFO] [stderr] Checking cfg-if v0.1.9 [INFO] [stderr] Checking ppv-lite86 v0.2.5 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking either v1.5.3 [INFO] [stderr] Compiling ndarray v0.13.0 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking indexmap v1.2.0 [INFO] [stderr] Checking spmc v0.3.0 [INFO] [stderr] Checking matrixmultiply v0.2.3 [INFO] [stderr] Checking itertools v0.8.0 [INFO] [stderr] Compiling num-traits v0.2.8 [INFO] [stderr] Compiling num-complex v0.2.3 [INFO] [stderr] Compiling num-integer v0.1.41 [INFO] [stderr] Checking c2-chacha v0.2.2 [INFO] [stderr] Checking num_cpus v1.10.1 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_chacha v0.2.1 [INFO] [stderr] Checking rand_pcg v0.2.0 [INFO] [stderr] Checking noisy_float v0.1.11 [INFO] [stderr] Checking rand v0.7.2 [INFO] [stderr] Checking rand_distr v0.2.2 [INFO] [stderr] Checking ndarray-stats v0.3.0 [INFO] [stderr] Checking ndarray-rand v0.11.0 [INFO] [stderr] Checking Algos v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `ArrayBase`, `Ix`, and `OwnedRepr` [INFO] [stdout] --> src/bin/neural_network.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | use ndarray::{arr2, Array, Array2, ArrayBase, Ix, OwnedRepr}; [INFO] [stdout] | ^^^^^^^^^ ^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ndarray::Ix2` [INFO] [stdout] --> src/bin/neural_network.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use ndarray::Ix2; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::process; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `grid_x` is never read [INFO] [stdout] --> src/bin/sudoku_solver.rs:13:17 [INFO] [stdout] | [INFO] [stdout] 13 | let mut grid_x = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `grid_y` is never read [INFO] [stdout] --> src/bin/sudoku_solver.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let mut grid_y = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/sudoku_solver.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | fn solve(mut r:i32, mut c:i32, mut board: &mut Vec>) -> bool { [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[E0308]: mismatched types [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | if b & 1 { [INFO] [stdout] | ^^^^^ expected `bool`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/spoj_prime_generator.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | io::stdin().read_line(&mut input); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = io::stdin().read_line(&mut input); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::process; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0271]: type mismatch resolving `<&[usize] as ShapeBuilder>::Dim == Dim<[usize; 2]>` [INFO] [stdout] --> src/bin/neural_network.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | let ones = Array2::::ones(sig.shape()); [INFO] [stdout] | ------------------- ^^^^^^^^^^^ expected `Dim<[usize; 2]>`, found `Dim` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Dim<[usize; 2]>` [INFO] [stdout] found struct `Dim` [INFO] [stdout] note: required by a bound in `ndarray::impl_constructors::>::ones` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/impl_constructors.rs:296:26 [INFO] [stdout] | [INFO] [stdout] 293 | pub fn ones(shape: Sh) -> Self [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] ... [INFO] [stdout] 296 | Sh: ShapeBuilder, [INFO] [stdout] | ^^^^^^^ required by this bound in `ndarray::impl_constructors::>::ones` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `fact` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:41:23 [INFO] [stdout] | [INFO] [stdout] 19 | let mut fact: Vec = Vec::new(); [INFO] [stdout] | -------- move occurs because `fact` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 39 | while res <= p { [INFO] [stdout] | -------------- inside of this loop [INFO] [stdout] 40 | let mut ok = true; [INFO] [stdout] 41 | for factor in fact { [INFO] [stdout] | ^^^^ `fact` moved due to this implicit call to `.into_iter()`, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: `into_iter` takes ownership of the receiver `self`, which moves `fact` [INFO] [stdout] --> /rustc/7df376b035b3d12ff0386ad8b45b76dbe020257b/library/core/src/iter/traits/collect.rs:310:18 [INFO] [stdout] help: consider iterating over a slice of the `Vec`'s content to avoid moving into the `for` loop [INFO] [stdout] | [INFO] [stdout] 41 | for factor in &fact { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let n: i32 = split[0].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | let k: i32 = split[1].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let a: i32 = split[2].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `sub` found for struct `ArrayBase` in the current scope [INFO] [stdout] --> src/bin/neural_network.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let one_minus = ones.sub(&sig); [INFO] [stdout] | ^^^ [INFO] [stdout] --> /rustc/7df376b035b3d12ff0386ad8b45b76dbe020257b/library/core/src/ops/arith.rs:205:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `ArrayBase, Dim<[usize; 2]>>` here [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: there is a method `sum` with a similar name, but with different arguments [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/numeric/impl_numeric.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / pub fn sum(&self) -> A [INFO] [stdout] 34 | | where [INFO] [stdout] 35 | | A: Clone + Add + num_traits::Zero, [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] help: trait `Sub` which provides `sub` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::ops::Sub; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | if b & 1 { [INFO] [stdout] | ^^^^^ expected `bool`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `grid_x` is never read [INFO] [stdout] --> src/bin/sudoku_solver.rs:13:17 [INFO] [stdout] | [INFO] [stdout] 13 | let mut grid_x = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `grid_y` is never read [INFO] [stdout] --> src/bin/sudoku_solver.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let mut grid_y = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/sudoku_solver.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | fn solve(mut r:i32, mut c:i32, mut board: &mut Vec>) -> bool { [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] Some errors have detailed explanations: E0308, E0382. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/spoj_prime_generator.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | io::stdin().read_line(&mut input); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = io::stdin().read_line(&mut input); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: SampleBorrow<{float}>` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:106:71 [INFO] [stdout] | [INFO] [stdout] 106 | let s = Array::random((1, X.shape()[0]), Uniform::new(0., X.shape()[0])); [INFO] [stdout] | ------------ ^^^^^^^^^^^^ the trait `SampleBorrow<{float}>` is not implemented for `usize` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `SampleBorrow` is implemented for `&'a Borrowed` [INFO] [stdout] note: required by a bound in `Uniform::::new` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.7.2/src/distributions/uniform.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn new(low: B1, high: B2) -> Uniform [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] 171 | where B1: SampleBorrow + Sized, [INFO] [stdout] 172 | B2: SampleBorrow + Sized [INFO] [stdout] | ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::new` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | for n in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for n in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | for i in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: NdIndex>` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:109:27 [INFO] [stdout] | [INFO] [stdout] 109 | let i = s[n as usize]; [INFO] [stdout] | ^^^^^^^^^^ the trait `NdIndex>` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `NdIndex`: [INFO] [stdout] `usize` implements `NdIndex>` [INFO] [stdout] `usize` implements `NdIndex>` [INFO] [stdout] = note: required for `ArrayBase, Dim<[usize; 2]>>` to implement `std::ops::Index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ViewRepr<&f64>: DataOwned` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:110:43 [INFO] [stdout] | [INFO] [stdout] 110 | let x = X.row(i as usize).reshape((1, X.shape()[1])); [INFO] [stdout] | ^^^^^^^ the trait `DataOwned` is not implemented for `ViewRepr<&f64>` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `DataOwned`: [INFO] [stdout] OwnedArcRepr [INFO] [stdout] OwnedRepr [INFO] [stdout] note: required by a bound in `ndarray::impl_methods::>::reshape` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/impl_methods.rs:1457:25 [INFO] [stdout] | [INFO] [stdout] 1455 | pub fn reshape(&self, shape: E) -> ArrayBase [INFO] [stdout] | ------- required by a bound in this associated function [INFO] [stdout] 1456 | where [INFO] [stdout] 1457 | S: DataShared + DataOwned, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `ndarray::impl_methods::>::reshape` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | for n in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `Algos` (bin "spoj_discrete_roots") due to 2 previous errors; 4 warnings emitted [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | let (mut mptx, mprx) = mpsc::channel(); [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] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused imports: `ArrayBase`, `Ix`, and `OwnedRepr` [INFO] [stdout] --> src/bin/neural_network.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | use ndarray::{arr2, Array, Array2, ArrayBase, Ix, OwnedRepr}; [INFO] [stdout] | ^^^^^^^^^ ^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ndarray::Ix2` [INFO] [stdout] --> src/bin/neural_network.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use ndarray::Ix2; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for n in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | for i in 0..cpus { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | sptx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 42 | let _ = sptx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `fact` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:41:23 [INFO] [stdout] | [INFO] [stdout] 19 | let mut fact: Vec = Vec::new(); [INFO] [stdout] | -------- move occurs because `fact` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 39 | while res <= p { [INFO] [stdout] | -------------- inside of this loop [INFO] [stdout] 40 | let mut ok = true; [INFO] [stdout] 41 | for factor in fact { [INFO] [stdout] | ^^^^ `fact` moved due to this implicit call to `.into_iter()`, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: `into_iter` takes ownership of the receiver `self`, which moves `fact` [INFO] [stdout] --> /rustc/7df376b035b3d12ff0386ad8b45b76dbe020257b/library/core/src/iter/traits/collect.rs:310:18 [INFO] [stdout] help: consider iterating over a slice of the `Vec`'s content to avoid moving into the `for` loop [INFO] [stdout] | [INFO] [stdout] 41 | for factor in &fact { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let n: i32 = split[0].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | let k: i32 = split[1].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/spoj_discrete_roots.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let a: i32 = split[2].trim().parse().unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_shared_memory.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | sptx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 42 | let _ = sptx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | tx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 21 | let _ = tx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | tx.send(return_value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 26 | let _ = tx.send(return_value); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | sptx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 38 | let _ = sptx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | let (mut mptx, mprx) = mpsc::channel(); [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] Some errors have detailed explanations: E0308, E0382. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | tx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 21 | let _ = tx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | tx.send(return_value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 26 | let _ = tx.send(return_value); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/producer_consumer_message_passing.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | sptx.send(exit); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 38 | let _ = sptx.send(exit); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: arguments to this method are incorrect [INFO] [stdout] --> src/bin/neural_network.rs:112:43 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: expected `&ArrayBase, ...>`, found `&ArrayBase, ...>` [INFO] [stdout] --> src/bin/neural_network.rs:112:63 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^ [INFO] [stdout] = note: expected reference `&ArrayBase, _>` [INFO] [stdout] found reference `&ArrayBase, _>` [INFO] [stdout] note: expected `&ArrayBase, ...>`, found `&ArrayBase, ...>` [INFO] [stdout] --> src/bin/neural_network.rs:112:67 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^^ [INFO] [stdout] = note: expected reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/bin/neural_network.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn cost_function_prime(&mut self, X: &Array2, y: &Array2) -> (Array2, Array2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ - - [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0271]: type mismatch resolving `, Dim<[usize; 2]>>>>::Output == f64` [INFO] [stdout] --> src/bin/neural_network.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | self.W1 = &self.W1 - d1; [INFO] [stdout] | ^ expected `f64`, found `ArrayBase, ...>` [INFO] [stdout] | [INFO] [stdout] = note: expected type `f64` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ArrayBase, Dim<[usize; 2]>>: ScalarOperand` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | self.W1 = &self.W1 - d1; [INFO] [stdout] | ^ the trait `ScalarOperand` is not implemented for `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 114 - self.W1 = &self.W1 - d1; [INFO] [stdout] 114 + self.W1 = self.W1 - d1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0271]: type mismatch resolving `, Dim<[usize; 2]>>>>::Output == f64` [INFO] [stdout] --> src/bin/neural_network.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | self.W2 = &self.W2 - d2; [INFO] [stdout] | ^ expected `f64`, found `ArrayBase, ...>` [INFO] [stdout] | [INFO] [stdout] = note: expected type `f64` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ArrayBase, Dim<[usize; 2]>>: ScalarOperand` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | self.W2 = &self.W2 - d2; [INFO] [stdout] | ^ the trait `ScalarOperand` is not implemented for `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 116 - self.W2 = &self.W2 - d2; [INFO] [stdout] 116 + self.W2 = self.W2 - d2; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `Algos` (bin "spoj_discrete_roots" test) due to 2 previous errors; 4 warnings emitted [INFO] [stdout] error[E0271]: type mismatch resolving `<&[usize] as ShapeBuilder>::Dim == Dim<[usize; 2]>` [INFO] [stdout] --> src/bin/neural_network.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | let ones = Array2::::ones(sig.shape()); [INFO] [stdout] | ------------------- ^^^^^^^^^^^ expected `Dim<[usize; 2]>`, found `Dim` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Dim<[usize; 2]>` [INFO] [stdout] found struct `Dim` [INFO] [stdout] note: required by a bound in `ndarray::impl_constructors::>::ones` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/impl_constructors.rs:296:26 [INFO] [stdout] | [INFO] [stdout] 293 | pub fn ones(shape: Sh) -> Self [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] ... [INFO] [stdout] 296 | Sh: ShapeBuilder, [INFO] [stdout] | ^^^^^^^ required by this bound in `ndarray::impl_constructors::>::ones` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 2 arguments but 0 arguments were supplied [INFO] [stdout] --> src/bin/neural_network.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | let cost = self.cost_function(); [INFO] [stdout] | ^^^^^^^^^^^^^-- two arguments of type `&ArrayBase, Dim<[usize; 2]>>` and `&ArrayBase, Dim<[usize; 2]>>` are missing [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/bin/neural_network.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | fn cost_function(&mut self, X: &Array2, y: &Array2) -> f64; [INFO] [stdout] | ^^^^^^^^^^^^^ - - [INFO] [stdout] help: provide the arguments [INFO] [stdout] | [INFO] [stdout] 119 | let cost = self.cost_function(/* &ArrayBase, Dim<[usize; 2]>> */, /* &ArrayBase, Dim<[usize; 2]>> */); [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `sub` found for struct `ArrayBase` in the current scope [INFO] [stdout] --> src/bin/neural_network.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let one_minus = ones.sub(&sig); [INFO] [stdout] | ^^^ [INFO] [stdout] --> /rustc/7df376b035b3d12ff0386ad8b45b76dbe020257b/library/core/src/ops/arith.rs:205:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `ArrayBase, Dim<[usize; 2]>>` here [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: there is a method `sum` with a similar name, but with different arguments [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/numeric/impl_numeric.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / pub fn sum(&self) -> A [INFO] [stdout] 34 | | where [INFO] [stdout] 35 | | A: Clone + Add + num_traits::Zero, [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] help: trait `Sub` which provides `sub` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::ops::Sub; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: SampleBorrow<{float}>` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:106:71 [INFO] [stdout] | [INFO] [stdout] 106 | let s = Array::random((1, X.shape()[0]), Uniform::new(0., X.shape()[0])); [INFO] [stdout] | ------------ ^^^^^^^^^^^^ the trait `SampleBorrow<{float}>` is not implemented for `usize` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `SampleBorrow` is implemented for `&'a Borrowed` [INFO] [stdout] note: required by a bound in `Uniform::::new` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.7.2/src/distributions/uniform.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn new(low: B1, high: B2) -> Uniform [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] 171 | where B1: SampleBorrow + Sized, [INFO] [stdout] 172 | B2: SampleBorrow + Sized [INFO] [stdout] | ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::new` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: NdIndex>` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:109:27 [INFO] [stdout] | [INFO] [stdout] 109 | let i = s[n as usize]; [INFO] [stdout] | ^^^^^^^^^^ the trait `NdIndex>` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `NdIndex`: [INFO] [stdout] `usize` implements `NdIndex>` [INFO] [stdout] `usize` implements `NdIndex>` [INFO] [stdout] = note: required for `ArrayBase, Dim<[usize; 2]>>` to implement `std::ops::Index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ViewRepr<&f64>: DataOwned` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:110:43 [INFO] [stdout] | [INFO] [stdout] 110 | let x = X.row(i as usize).reshape((1, X.shape()[1])); [INFO] [stdout] | ^^^^^^^ the trait `DataOwned` is not implemented for `ViewRepr<&f64>` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `DataOwned`: [INFO] [stdout] OwnedArcRepr [INFO] [stdout] OwnedRepr [INFO] [stdout] note: required by a bound in `ndarray::impl_methods::>::reshape` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/impl_methods.rs:1457:25 [INFO] [stdout] | [INFO] [stdout] 1455 | pub fn reshape(&self, shape: E) -> ArrayBase [INFO] [stdout] | ------- required by a bound in this associated function [INFO] [stdout] 1456 | where [INFO] [stdout] 1457 | S: DataShared + DataOwned, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `ndarray::impl_methods::>::reshape` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `powi` found for struct `ArrayBase` in the current scope [INFO] [stdout] --> src/bin/neural_network.rs:131:37 [INFO] [stdout] | [INFO] [stdout] 131 | let squared_summed = ymyhat.powi(2).sum(); [INFO] [stdout] | ^^^^ method not found in `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot multiply `{integer}` by `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] --> src/bin/neural_network.rs:143:23 [INFO] [stdout] | [INFO] [stdout] 143 | let rsub = -1 * ymyh; [INFO] [stdout] | ^ no implementation for `{integer} * ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Mul, Dim<[usize; 2]>>>` is not implemented for `{integer}` [INFO] [stdout] = help: the following other types implement trait `Mul`: [INFO] [stdout] `&f128` implements `Mul` [INFO] [stdout] `&f128` implements `Mul` [INFO] [stdout] `&f16` implements `Mul` [INFO] [stdout] `&f16` implements `Mul` [INFO] [stdout] `&f32` implements `Mul<&num_complex::Complex>` [INFO] [stdout] `&f32` implements `Mul` [INFO] [stdout] `&f32` implements `Mul>` [INFO] [stdout] `&f32` implements `Mul` [INFO] [stdout] and 137 others [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: arguments to this method are incorrect [INFO] [stdout] --> src/bin/neural_network.rs:112:43 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: expected `&ArrayBase, ...>`, found `&ArrayBase, ...>` [INFO] [stdout] --> src/bin/neural_network.rs:112:63 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^ [INFO] [stdout] = note: expected reference `&ArrayBase, _>` [INFO] [stdout] found reference `&ArrayBase, _>` [INFO] [stdout] note: expected `&ArrayBase, ...>`, found `&ArrayBase, ...>` [INFO] [stdout] --> src/bin/neural_network.rs:112:67 [INFO] [stdout] | [INFO] [stdout] 112 | let (djdw1, djdw2) = self.cost_function_prime(&x, &yt); [INFO] [stdout] | ^^^ [INFO] [stdout] = note: expected reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/bin/neural_network.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn cost_function_prime(&mut self, X: &Array2, y: &Array2) -> (Array2, Array2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ - - [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0271]: type mismatch resolving `, Dim<[usize; 2]>>>>::Output == f64` [INFO] [stdout] --> src/bin/neural_network.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | self.W1 = &self.W1 - d1; [INFO] [stdout] | ^ expected `f64`, found `ArrayBase, ...>` [INFO] [stdout] | [INFO] [stdout] = note: expected type `f64` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ArrayBase, Dim<[usize; 2]>>: ScalarOperand` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | self.W1 = &self.W1 - d1; [INFO] [stdout] | ^ the trait `ScalarOperand` is not implemented for `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 114 - self.W1 = &self.W1 - d1; [INFO] [stdout] 114 + self.W1 = self.W1 - d1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0271]: type mismatch resolving `, Dim<[usize; 2]>>>>::Output == f64` [INFO] [stdout] --> src/bin/neural_network.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | self.W2 = &self.W2 - d2; [INFO] [stdout] | ^ expected `f64`, found `ArrayBase, ...>` [INFO] [stdout] | [INFO] [stdout] = note: expected type `f64` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `ArrayBase, Dim<[usize; 2]>>: ScalarOperand` is not satisfied [INFO] [stdout] --> src/bin/neural_network.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | self.W2 = &self.W2 - d2; [INFO] [stdout] | ^ the trait `ScalarOperand` is not implemented for `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = note: required for `&ArrayBase, Dim<[usize; 2]>>` to implement `Sub, Dim<[usize; 2]>>>` [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 116 - self.W2 = &self.W2 - d2; [INFO] [stdout] 116 + self.W2 = self.W2 - d2; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 2 arguments but 0 arguments were supplied [INFO] [stdout] --> src/bin/neural_network.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | let cost = self.cost_function(); [INFO] [stdout] | ^^^^^^^^^^^^^-- two arguments of type `&ArrayBase, Dim<[usize; 2]>>` and `&ArrayBase, Dim<[usize; 2]>>` are missing [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/bin/neural_network.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | fn cost_function(&mut self, X: &Array2, y: &Array2) -> f64; [INFO] [stdout] | ^^^^^^^^^^^^^ - - [INFO] [stdout] help: provide the arguments [INFO] [stdout] | [INFO] [stdout] 119 | let cost = self.cost_function(/* &ArrayBase, Dim<[usize; 2]>> */, /* &ArrayBase, Dim<[usize; 2]>> */); [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `powi` found for struct `ArrayBase` in the current scope [INFO] [stdout] --> src/bin/neural_network.rs:131:37 [INFO] [stdout] | [INFO] [stdout] 131 | let squared_summed = ymyhat.powi(2).sum(); [INFO] [stdout] | ^^^^ method not found in `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot multiply `{integer}` by `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] --> src/bin/neural_network.rs:143:23 [INFO] [stdout] | [INFO] [stdout] 143 | let rsub = -1 * ymyh; [INFO] [stdout] | ^ no implementation for `{integer} * ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Mul, Dim<[usize; 2]>>>` is not implemented for `{integer}` [INFO] [stdout] = help: the following other types implement trait `Mul`: [INFO] [stdout] `&f128` implements `Mul` [INFO] [stdout] `&f128` implements `Mul` [INFO] [stdout] `&f16` implements `Mul` [INFO] [stdout] `&f16` implements `Mul` [INFO] [stdout] `&f32` implements `Mul<&num_complex::Complex>` [INFO] [stdout] `&f32` implements `Mul` [INFO] [stdout] `&f32` implements `Mul>` [INFO] [stdout] `&f32` implements `Mul` [INFO] [stdout] and 137 others [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/neural_network.rs:154:31 [INFO] [stdout] | [INFO] [stdout] 154 | let djdw1 = X.t().dot(delta2); [INFO] [stdout] | --- ^^^^^^ expected `&_`, found `ArrayBase, ...>` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&_` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] note: method defined here [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/linalg/impl_linalg.rs:245:12 [INFO] [stdout] | [INFO] [stdout] 245 | pub fn dot(&self, rhs: &Rhs) -> >::Output [INFO] [stdout] | ^^^ [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 154 | let djdw1 = X.t().dot(&delta2); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | let mut W1: Array2 = Array2::::random( [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] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | let mut W2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut Z2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let mut Z3: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut A2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | let mut bottom = z * -1.; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0061, E0271, E0277, E0308, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stderr] error: could not compile `Algos` (bin "neural_network") due to 14 previous errors; 8 warnings emitted [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/neural_network.rs:154:31 [INFO] [stdout] | [INFO] [stdout] 154 | let djdw1 = X.t().dot(delta2); [INFO] [stdout] | --- ^^^^^^ expected `&_`, found `ArrayBase, ...>` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&_` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] note: method defined here [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.13.0/src/linalg/impl_linalg.rs:245:12 [INFO] [stdout] | [INFO] [stdout] 245 | pub fn dot(&self, rhs: &Rhs) -> >::Output [INFO] [stdout] | ^^^ [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 154 | let djdw1 = X.t().dot(&delta2); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | let mut W1: Array2 = Array2::::random( [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] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | let mut W2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut Z2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let mut Z3: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut A2: Array2 = Array2::::random( [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/neural_network.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | let mut bottom = z * -1.; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0061, E0271, E0277, E0308, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stderr] error: could not compile `Algos` (bin "neural_network" test) due to 14 previous errors; 8 warnings emitted [INFO] running `Command { std: "docker" "inspect" "cfa0fea611fca31a5fcf44159510898432bb933fc888bac12f2df372ac6e884e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cfa0fea611fca31a5fcf44159510898432bb933fc888bac12f2df372ac6e884e", kill_on_drop: false }` [INFO] [stdout] cfa0fea611fca31a5fcf44159510898432bb933fc888bac12f2df372ac6e884e