[INFO] crate tensor 0.1.2 is already in cache [INFO] extracting crate tensor 0.1.2 into work/ex/clippy-test-run/sources/stable/reg/tensor/0.1.2 [INFO] extracting crate tensor 0.1.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tensor/0.1.2 [INFO] validating manifest of tensor-0.1.2 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of tensor-0.1.2 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing tensor-0.1.2 [INFO] finished frobbing tensor-0.1.2 [INFO] frobbed toml for tensor-0.1.2 written to work/ex/clippy-test-run/sources/stable/reg/tensor/0.1.2/Cargo.toml [INFO] started frobbing tensor-0.1.2 [INFO] finished frobbing tensor-0.1.2 [INFO] frobbed toml for tensor-0.1.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tensor/0.1.2/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting tensor-0.1.2 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/tensor/0.1.2:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 36c58a7736803fc87b812d264dcd57aa3bc3d9be48a27bab423061987a6292e6 [INFO] running `"docker" "start" "-a" "36c58a7736803fc87b812d264dcd57aa3bc3d9be48a27bab423061987a6292e6"` [INFO] [stderr] Checking tensor v0.1.2 (/opt/crater/workdir) [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/tensor.rs:207:17 [INFO] [stderr] | [INFO] [stderr] 207 | print!{ "T[{},{}]: {}\n", i, j, self.get(i, j) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/tensor.rs:207:17 [INFO] [stderr] | [INFO] [stderr] 207 | print!{ "T[{},{}]: {}\n", i, j, self.get(i, j) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/tensor.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | let mut new_tensor = &mut Tensor::build(self.dim, new_rank, vec![T::zero(); len]); [INFO] [stderr] | ----^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `clone` on this type; consider implementing the `std::clone::Clone` trait or choosing a less ambiguous name [INFO] [stderr] --> src/tensor.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / pub fn clone(&self) -> Self { [INFO] [stderr] 37 | | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.rank` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:52:13 [INFO] [stderr] | [INFO] [stderr] 52 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:97:19 [INFO] [stderr] | [INFO] [stderr] 97 | v.push(self.dim.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:109:21 [INFO] [stderr] | [INFO] [stderr] 109 | for _ in 0..p { a = a*n; } [INFO] [stderr] | ^^^^^^^ help: replace it with: `a *= n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:114:80 [INFO] [stderr] | [INFO] [stderr] 114 | pub fn inner_product_loop>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:120:85 [INFO] [stderr] | [INFO] [stderr] 120 | pub fn inner_product_loop_many>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:122:8 [INFO] [stderr] | [INFO] [stderr] 122 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:145:8 [INFO] [stderr] | [INFO] [stderr] 145 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:154:17 [INFO] [stderr] | [INFO] [stderr] 154 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:177:9 [INFO] [stderr] | [INFO] [stderr] 177 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:202:9 [INFO] [stderr] | [INFO] [stderr] 202 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/tensor.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | let mut new_tensor = &mut Tensor::build(self.dim, new_rank, vec![T::zero(); len]); [INFO] [stderr] | ----^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `clone` on this type; consider implementing the `std::clone::Clone` trait or choosing a less ambiguous name [INFO] [stderr] --> src/tensor.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / pub fn clone(&self) -> Self { [INFO] [stderr] 37 | | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.rank` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:52:13 [INFO] [stderr] | [INFO] [stderr] 52 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:97:19 [INFO] [stderr] | [INFO] [stderr] 97 | v.push(self.dim.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:109:21 [INFO] [stderr] | [INFO] [stderr] 109 | for _ in 0..p { a = a*n; } [INFO] [stderr] | ^^^^^^^ help: replace it with: `a *= n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:114:80 [INFO] [stderr] | [INFO] [stderr] 114 | pub fn inner_product_loop>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:120:85 [INFO] [stderr] | [INFO] [stderr] 120 | pub fn inner_product_loop_many>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:122:8 [INFO] [stderr] | [INFO] [stderr] 122 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:145:8 [INFO] [stderr] | [INFO] [stderr] 145 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:154:17 [INFO] [stderr] | [INFO] [stderr] 154 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:177:9 [INFO] [stderr] | [INFO] [stderr] 177 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:202:9 [INFO] [stderr] | [INFO] [stderr] 202 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/tensor.rs:207:17 [INFO] [stderr] | [INFO] [stderr] 207 | print!{ "T[{},{}]: {}\n", i, j, self.get(i, j) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/tensor.rs:207:17 [INFO] [stderr] | [INFO] [stderr] 207 | print!{ "T[{},{}]: {}\n", i, j, self.get(i, j) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/tensor.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | let mut new_tensor = &mut Tensor::build(self.dim, new_rank, vec![T::zero(); len]); [INFO] [stderr] | ----^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `clone` on this type; consider implementing the `std::clone::Clone` trait or choosing a less ambiguous name [INFO] [stderr] --> src/tensor.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / pub fn clone(&self) -> Self { [INFO] [stderr] 37 | | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.rank` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:52:13 [INFO] [stderr] | [INFO] [stderr] 52 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:97:19 [INFO] [stderr] | [INFO] [stderr] 97 | v.push(self.dim.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:109:21 [INFO] [stderr] | [INFO] [stderr] 109 | for _ in 0..p { a = a*n; } [INFO] [stderr] | ^^^^^^^ help: replace it with: `a *= n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:114:80 [INFO] [stderr] | [INFO] [stderr] 114 | pub fn inner_product_loop>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:120:85 [INFO] [stderr] | [INFO] [stderr] 120 | pub fn inner_product_loop_many>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:122:8 [INFO] [stderr] | [INFO] [stderr] 122 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:145:8 [INFO] [stderr] | [INFO] [stderr] 145 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:154:17 [INFO] [stderr] | [INFO] [stderr] 154 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:177:9 [INFO] [stderr] | [INFO] [stderr] 177 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:202:9 [INFO] [stderr] | [INFO] [stderr] 202 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/tensor.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | let mut new_tensor = &mut Tensor::build(self.dim, new_rank, vec![T::zero(); len]); [INFO] [stderr] | ----^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `clone` on this type; consider implementing the `std::clone::Clone` trait or choosing a less ambiguous name [INFO] [stderr] --> src/tensor.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / pub fn clone(&self) -> Self { [INFO] [stderr] 37 | | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | Tensor::build(self.dim.clone(), self.rank.clone(), self.components.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.rank` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:52:13 [INFO] [stderr] | [INFO] [stderr] 52 | i = i + scalar_power(self.dim, x as i32) * indices[x as usize]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i += scalar_power(self.dim, x as i32) * indices[x as usize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:97:19 [INFO] [stderr] | [INFO] [stderr] 97 | v.push(self.dim.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:109:21 [INFO] [stderr] | [INFO] [stderr] 109 | for _ in 0..p { a = a*n; } [INFO] [stderr] | ^^^^^^^ help: replace it with: `a *= n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:114:80 [INFO] [stderr] | [INFO] [stderr] 114 | pub fn inner_product_loop>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/tensor.rs:120:85 [INFO] [stderr] | [INFO] [stderr] 120 | pub fn inner_product_loop_many>(max_indices: Vec, f: fn(&mut Tensor, &Tensor, &Tensor, &[i32]), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:122:8 [INFO] [stderr] | [INFO] [stderr] 122 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tensor.rs:145:8 [INFO] [stderr] | [INFO] [stderr] 145 | if max_indices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `max_indices.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/tensor.rs:154:17 [INFO] [stderr] | [INFO] [stderr] 154 | args[index as usize] = args[index as usize] + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `args[index as usize] += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:177:9 [INFO] [stderr] | [INFO] [stderr] 177 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:202:9 [INFO] [stderr] | [INFO] [stderr] 202 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/tensor.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | self.dim.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dim` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.20s [INFO] running `"docker" "inspect" "36c58a7736803fc87b812d264dcd57aa3bc3d9be48a27bab423061987a6292e6"` [INFO] running `"docker" "rm" "-f" "36c58a7736803fc87b812d264dcd57aa3bc3d9be48a27bab423061987a6292e6"` [INFO] [stdout] 36c58a7736803fc87b812d264dcd57aa3bc3d9be48a27bab423061987a6292e6