[INFO] cloning repository https://github.com/vosen/ptx_tests [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vosen/ptx_tests" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvosen%2Fptx_tests", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvosen%2Fptx_tests'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 76d4dcef6a2e40fb3ab173c2ceda5f0098218f8b [INFO] linting vosen/ptx_tests against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvosen%2Fptx_tests" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-7-tc1/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-7-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/vosen/ptx_tests [INFO] finished tweaking git repo https://github.com/vosen/ptx_tests [INFO] tweaked toml for git repo https://github.com/vosen/ptx_tests written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/vosen/ptx_tests on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/vosen/ptx_tests 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" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded argh_shared v0.1.12 [INFO] [stderr] Downloaded float8 v0.4.2 [INFO] [stderr] Downloaded argh_derive v0.1.12 [INFO] [stderr] Downloaded bpaf_derive v0.5.13 [INFO] [stderr] Downloaded argh v0.1.12 [INFO] [stderr] Downloaded bpaf v0.9.14 [INFO] [stderr] Downloaded rug v1.26.1 [INFO] [stderr] Downloaded gmp-mpfr-sys v1.6.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 25a2e8cbf23713dc88fb4d388792e1b23f9c8473b7623bf5fe308be268701ed3 [INFO] running `Command { std: "docker" "start" "-a" "25a2e8cbf23713dc88fb4d388792e1b23f9c8473b7623bf5fe308be268701ed3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "25a2e8cbf23713dc88fb4d388792e1b23f9c8473b7623bf5fe308be268701ed3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "25a2e8cbf23713dc88fb4d388792e1b23f9c8473b7623bf5fe308be268701ed3", kill_on_drop: false }` [INFO] [stdout] 25a2e8cbf23713dc88fb4d388792e1b23f9c8473b7623bf5fe308be268701ed3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] cdd7d0f3a2f0921037d27d6a1b89f2ba00fe6ddf53bef450f5b5471a2a522147 [INFO] running `Command { std: "docker" "start" "-a" "cdd7d0f3a2f0921037d27d6a1b89f2ba00fe6ddf53bef450f5b5471a2a522147", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling libc v0.2.159 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling gmp-mpfr-sys v1.6.4 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Compiling rug v1.26.1 [INFO] [stderr] Compiling bpaf_derive v0.5.13 [INFO] [stderr] Checking libloading v0.8.5 [INFO] [stderr] Checking az v1.2.1 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking half v2.4.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking rand_xorshift v0.3.0 [INFO] [stderr] Checking float8 v0.4.2 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking bpaf v0.9.14 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking regex-automata v0.4.8 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking regex v1.11.0 [INFO] [stderr] Compiling argh_shared v0.1.12 [INFO] [stderr] Compiling argh_derive v0.1.12 [INFO] [stderr] Checking argh v0.1.12 [INFO] [stderr] Checking ptx_tests v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | fn mul(mode: Mode) -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] 57 | where [INFO] [stdout] 58 | T: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn mul(mode: Mode) -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 59 | U: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | fn mul_wide() -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] 118 | where [INFO] [stdout] 119 | T: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:117:27 [INFO] [stdout] | [INFO] [stdout] 117 | fn mul_wide() -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 120 | U: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/testcase/set.rs:11:19 [INFO] [stdout] | [INFO] [stdout] 11 | static SET_BOOL: &'static str = include_str!("set_bool.ptx"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/testcase/set.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | static SET: &'static str = include_str!("set.ptx"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | fn mul(mode: Mode) -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] 57 | where [INFO] [stdout] 58 | T: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn mul(mode: Mode) -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 59 | U: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | fn mul_wide() -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] 118 | where [INFO] [stdout] 119 | T: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/testcase/mul.rs:117:27 [INFO] [stdout] | [INFO] [stdout] 117 | fn mul_wide() -> TestCase [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 120 | U: PrimInt + AsPrimitive, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/testcase/set.rs:11:19 [INFO] [stdout] | [INFO] [stdout] 11 | static SET_BOOL: &'static str = include_str!("set_bool.ptx"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/testcase/set.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | static SET: &'static str = include_str!("set.ptx"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/common.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | / match self { [INFO] [stdout] 150 | | Comparison::Eq [INFO] [stdout] 151 | | | Comparison::Ne [INFO] [stdout] 152 | | | Comparison::Lt [INFO] [stdout] ... | [INFO] [stdout] 156 | | _ => false, [INFO] [stdout] 157 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 149 ~ matches!(self, Comparison::Eq [INFO] [stdout] 150 + | Comparison::Ne [INFO] [stdout] 151 + | Comparison::Lt [INFO] [stdout] 152 + | Comparison::Le [INFO] [stdout] 153 + | Comparison::Gt [INFO] [stdout] 154 + | Comparison::Ge) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/common.rs:366:8 [INFO] [stdout] | [INFO] [stdout] 366 | if input >= f32::consts::PI * -2.0 && input <= f32::consts::PI * 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(f32::consts::PI * -2.0..=f32::consts::PI * 2.0).contains(&input)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/common.rs:368:15 [INFO] [stdout] | [INFO] [stdout] 368 | } else if input >= f32::consts::PI * -100.0 && input <= f32::consts::PI * 100.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(f32::consts::PI * -100.0..=f32::consts::PI * 100.0).contains(&input)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/main.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | pub unsafe fn $fn_name(&self, $( $arg_id : $arg_type),*) -> $ret_type { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/cuda.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / impl_library! { [INFO] [stdout] 56 | | "system" fn cuInit(Flags: ::std::os::raw::c_uint) -> CUresult; [INFO] [stdout] 57 | | "system" fn cuCtxCreate_v2( [INFO] [stdout] 58 | | pctx: *mut CUcontext, [INFO] [stdout] ... | [INFO] [stdout] 101 | | "system" fn cuMemGetInfo_v2(free: *mut usize, total: *mut usize) -> CUresult; [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] = note: this warning originates in the macro `impl_library` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/test.rs:5:43 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{any::Any, fmt::Debug, mem, ptr, u32}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/common.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | / match self { [INFO] [stdout] 150 | | Comparison::Eq [INFO] [stdout] 151 | | | Comparison::Ne [INFO] [stdout] 152 | | | Comparison::Lt [INFO] [stdout] ... | [INFO] [stdout] 156 | | _ => false, [INFO] [stdout] 157 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 149 ~ matches!(self, Comparison::Eq [INFO] [stdout] 150 + | Comparison::Ne [INFO] [stdout] 151 + | Comparison::Lt [INFO] [stdout] 152 + | Comparison::Le [INFO] [stdout] 153 + | Comparison::Gt [INFO] [stdout] 154 + | Comparison::Ge) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/test.rs:650:13 [INFO] [stdout] | [INFO] [stdout] 650 | 0b01111101 | 0b01111110 | 0b01111111 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0b01111101..=0b01111111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:674:21 [INFO] [stdout] | [INFO] [stdout] 674 | / return Err(TestError::CompilationFail { [INFO] [stdout] 675 | | message: format!("CUDA Error {code}"), [INFO] [stdout] 676 | | }) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 674 ~ Err(TestError::CompilationFail { [INFO] [stdout] 675 + message: format!("CUDA Error {code}"), [INFO] [stdout] 676 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:680:25 [INFO] [stdout] | [INFO] [stdout] 680 | Err(message) => return Err(TestError::CompilationFail { message }), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 680 - Err(message) => return Err(TestError::CompilationFail { message }), [INFO] [stdout] 680 + Err(message) => Err(TestError::CompilationFail { message }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/test.rs:806:5 [INFO] [stdout] | [INFO] [stdout] 806 | ((value + multiple - 1) / multiple) * multiple [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `value.div_ceil(multiple)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/common.rs:366:8 [INFO] [stdout] | [INFO] [stdout] 366 | if input >= f32::consts::PI * -2.0 && input <= f32::consts::PI * 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(f32::consts::PI * -2.0..=f32::consts::PI * 2.0).contains(&input)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/test.rs:826:8 [INFO] [stdout] | [INFO] [stdout] 826 | if total_elements % GROUP_SIZE != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_elements.is_multiple_of(GROUP_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/common.rs:368:15 [INFO] [stdout] | [INFO] [stdout] 368 | } else if input >= f32::consts::PI * -100.0 && input <= f32::consts::PI * 100.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(f32::consts::PI * -100.0..=f32::consts::PI * 100.0).contains(&input)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/main.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | pub unsafe fn $fn_name(&self, $( $arg_id : $arg_type),*) -> $ret_type { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/cuda.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / impl_library! { [INFO] [stdout] 56 | | "system" fn cuInit(Flags: ::std::os::raw::c_uint) -> CUresult; [INFO] [stdout] 57 | | "system" fn cuCtxCreate_v2( [INFO] [stdout] 58 | | pctx: *mut CUcontext, [INFO] [stdout] ... | [INFO] [stdout] 101 | | "system" fn cuMemGetInfo_v2(free: *mut usize, total: *mut usize) -> CUresult; [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] = note: this warning originates in the macro `impl_library` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:933:5 [INFO] [stdout] | [INFO] [stdout] 933 | return Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 933 - return Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)); [INFO] [stdout] 933 + Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:937:5 [INFO] [stdout] | [INFO] [stdout] 937 | return Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 937 - return Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)); [INFO] [stdout] 937 + Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/abs.rs:35:49 [INFO] [stdout] | [INFO] [stdout] 35 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 36 | | Ok(()) [INFO] [stdout] 37 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/abs.rs:37:58 [INFO] [stdout] | [INFO] [stdout] 37 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 38 | | Ok(()) [INFO] [stdout] 39 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/test.rs:5:43 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{any::Any, fmt::Debug, mem, ptr, u32}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/testcase/add.rs:40:61 [INFO] [stdout] | [INFO] [stdout] 40 | TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest::default())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 40 - TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest::default())), [INFO] [stdout] 40 + TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/add_f.rs:45:51 [INFO] [stdout] | [INFO] [stdout] 45 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 46 | | Ok(()) [INFO] [stdout] 47 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/add_f.rs:47:56 [INFO] [stdout] | [INFO] [stdout] 47 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 48 | | Ok(()) [INFO] [stdout] 49 | | } else if expected == 0.0 && output == 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/add_f.rs:133:28 [INFO] [stdout] | [INFO] [stdout] 133 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 134 | | result = 0.0; [INFO] [stdout] 135 | | } else if result < 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/add_f.rs:135:32 [INFO] [stdout] | [INFO] [stdout] 135 | } else if result < 0.0 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 136 | | result = 0.0; [INFO] [stdout] 137 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/add_f.rs:135:16 [INFO] [stdout] | [INFO] [stdout] 135 | } else if result < 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 136 | | result = 0.0; [INFO] [stdout] 137 | | } else if result > 1.0 { [INFO] [stdout] 138 | | result = 1.0; [INFO] [stdout] 139 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/testcase/addc_subc.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | !(carry_in != 0) as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(carry_in == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/test.rs:650:13 [INFO] [stdout] | [INFO] [stdout] 650 | 0b01111101 | 0b01111110 | 0b01111111 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0b01111101..=0b01111111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:674:21 [INFO] [stdout] | [INFO] [stdout] 674 | / return Err(TestError::CompilationFail { [INFO] [stdout] 675 | | message: format!("CUDA Error {code}"), [INFO] [stdout] 676 | | }) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 674 ~ Err(TestError::CompilationFail { [INFO] [stdout] 675 + message: format!("CUDA Error {code}"), [INFO] [stdout] 676 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:680:25 [INFO] [stdout] | [INFO] [stdout] 680 | Err(message) => return Err(TestError::CompilationFail { message }), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 680 - Err(message) => return Err(TestError::CompilationFail { message }), [INFO] [stdout] 680 + Err(message) => Err(TestError::CompilationFail { message }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/cos.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/testcase/cvt.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / if ftz { [INFO] [stdout] 39 | | if !Output::is_f32() && !Input::is_f32() { [INFO] [stdout] 40 | | return true; [INFO] [stdout] 41 | | } [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 38 ~ if ftz [INFO] [stdout] 39 ~ && !Output::is_f32() && !Input::is_f32() { [INFO] [stdout] 40 | return true; [INFO] [stdout] 41 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/test.rs:806:5 [INFO] [stdout] | [INFO] [stdout] 806 | ((value + multiple - 1) / multiple) * multiple [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `value.div_ceil(multiple)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/testcase/cvt.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | } else if rounding.starts_with('.') { [INFO] [stdout] | ____________^ [INFO] [stdout] 65 | | if !(!Input::float() && Output::float() [INFO] [stdout] 66 | | || Input::float() [INFO] [stdout] 67 | | && Output::float() [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 64 ~ } else if rounding.starts_with('.') [INFO] [stdout] 65 ~ && !(!Input::float() && Output::float() [INFO] [stdout] 66 | || Input::float() [INFO] [stdout] ... [INFO] [stdout] 70 | return true; [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/test.rs:826:8 [INFO] [stdout] | [INFO] [stdout] 826 | if total_elements % GROUP_SIZE != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_elements.is_multiple_of(GROUP_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:933:5 [INFO] [stdout] | [INFO] [stdout] 933 | return Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 933 - return Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)); [INFO] [stdout] 933 + Box::new(move |ctx, fail_fast| run_random::(ctx, t, fail_fast)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/test.rs:937:5 [INFO] [stdout] | [INFO] [stdout] 937 | return Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 937 - return Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)); [INFO] [stdout] 937 + Box::new(move |ctx, fail_fast| run_range::(ctx, t, fail_fast)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/abs.rs:35:49 [INFO] [stdout] | [INFO] [stdout] 35 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 36 | | Ok(()) [INFO] [stdout] 37 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/abs.rs:37:58 [INFO] [stdout] | [INFO] [stdout] 37 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 38 | | Ok(()) [INFO] [stdout] 39 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/testcase/add.rs:40:61 [INFO] [stdout] | [INFO] [stdout] 40 | TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest::default())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 40 - TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest::default())), [INFO] [stdout] 40 + TestCase::new("add_sat_s32".to_string(), make_range(AddSatTest)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/add_f.rs:45:51 [INFO] [stdout] | [INFO] [stdout] 45 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 46 | | Ok(()) [INFO] [stdout] 47 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/add_f.rs:47:56 [INFO] [stdout] | [INFO] [stdout] 47 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 48 | | Ok(()) [INFO] [stdout] 49 | | } else if expected == 0.0 && output == 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/add_f.rs:133:28 [INFO] [stdout] | [INFO] [stdout] 133 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 134 | | result = 0.0; [INFO] [stdout] 135 | | } else if result < 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/add_f.rs:135:32 [INFO] [stdout] | [INFO] [stdout] 135 | } else if result < 0.0 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 136 | | result = 0.0; [INFO] [stdout] 137 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/add_f.rs:135:16 [INFO] [stdout] | [INFO] [stdout] 135 | } else if result < 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 136 | | result = 0.0; [INFO] [stdout] 137 | | } else if result > 1.0 { [INFO] [stdout] 138 | | result = 1.0; [INFO] [stdout] 139 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/testcase/addc_subc.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | !(carry_in != 0) as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(carry_in == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/cos.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/testcase/cvt.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / if ftz { [INFO] [stdout] 39 | | if !Output::is_f32() && !Input::is_f32() { [INFO] [stdout] 40 | | return true; [INFO] [stdout] 41 | | } [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 38 ~ if ftz [INFO] [stdout] 39 ~ && !Output::is_f32() && !Input::is_f32() { [INFO] [stdout] 40 | return true; [INFO] [stdout] 41 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/testcase/cvt.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | } else if rounding.starts_with('.') { [INFO] [stdout] | ____________^ [INFO] [stdout] 65 | | if !(!Input::float() && Output::float() [INFO] [stdout] 66 | | || Input::float() [INFO] [stdout] 67 | | && Output::float() [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 64 ~ } else if rounding.starts_with('.') [INFO] [stdout] 65 ~ && !(!Input::float() && Output::float() [INFO] [stdout] 66 | || Input::float() [INFO] [stdout] ... [INFO] [stdout] 70 | return true; [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> src/testcase/cvt.rs:251:16 [INFO] [stdout] | [INFO] [stdout] 251 | fn as_hack(self) -> T; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/testcase/cvt.rs:296:36 [INFO] [stdout] | [INFO] [stdout] 296 | (unsafe { mem::transmute::<_, f16>(self) }) as $output [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] ... [INFO] [stdout] 303 | convert_as_from_f16!(); [INFO] [stdout] | ---------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] = note: this warning originates in the macro `convert_as_from_f16` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> src/testcase/cvt.rs:251:16 [INFO] [stdout] | [INFO] [stdout] 251 | fn as_hack(self) -> T; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/testcase/cvt.rs:437:34 [INFO] [stdout] | [INFO] [stdout] 437 | let this = unsafe { mem::transmute::<_, f16>(self) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/testcase/cvt.rs:296:36 [INFO] [stdout] | [INFO] [stdout] 296 | (unsafe { mem::transmute::<_, f16>(self) }) as $output [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] ... [INFO] [stdout] 303 | convert_as_from_f16!(); [INFO] [stdout] | ---------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] = note: this warning originates in the macro `convert_as_from_f16` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/testcase/cvt.rs:437:34 [INFO] [stdout] | [INFO] [stdout] 437 | let this = unsafe { mem::transmute::<_, f16>(self) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:44:45 [INFO] [stdout] | [INFO] [stdout] 44 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 45 | | true [INFO] [stdout] 46 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:46:54 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ____________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | false [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ expected.to_bits() == output.to_bits() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:44:61 [INFO] [stdout] | [INFO] [stdout] 44 | if expected.is_nan_correct() && output.is_nan_correct() { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 45 | | true [INFO] [stdout] 46 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:46:54 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ____________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | false [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ expected.to_bits() == output.to_bits() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/div.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 72 | let result = exact_f64 as f32; [INFO] [stdout] | ------------------------------ unnecessary `let` binding [INFO] [stdout] 73 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 72 ~ [INFO] [stdout] 73 ~ exact_f64 as f32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/testcase/div.rs:204:43 [INFO] [stdout] | [INFO] [stdout] 204 | DivVariant::Rnd(ref r) => format!("{}", r.as_str()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r.as_str().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/testcase/dot_product.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | .zip(b.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 105 - .zip(b.into_iter()) [INFO] [stdout] 105 + .zip(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/testcase/dot_product.rs:152:14 [INFO] [stdout] | [INFO] [stdout] 152 | .zip(b.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 152 - .zip(b.into_iter()) [INFO] [stdout] 152 + .zip(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:44:45 [INFO] [stdout] | [INFO] [stdout] 44 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 45 | | true [INFO] [stdout] 46 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:46:54 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/testcase/cvt_rn_f16x2_f8x2type.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ____________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | false [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ expected.to_bits() == output.to_bits() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/fma_f.rs:118:79 [INFO] [stdout] | [INFO] [stdout] 118 | if (expected.to_bits() as i32).abs_diff(output.to_bits() as i32) <= 1 { [INFO] [stdout] | _______________________________________________________________________________^ [INFO] [stdout] 119 | | Ok(()) [INFO] [stdout] 120 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/fma_f.rs:120:56 [INFO] [stdout] | [INFO] [stdout] 120 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 121 | | Ok(()) [INFO] [stdout] 122 | | } else if expected == 0.0 && output == 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/fma_f.rs:152:28 [INFO] [stdout] | [INFO] [stdout] 152 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 153 | | result = 0.0; [INFO] [stdout] 154 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/fma_f.rs:154:33 [INFO] [stdout] | [INFO] [stdout] 154 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 155 | | result = 0.0; [INFO] [stdout] 156 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/fma_f.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 155 | | result = 0.0; [INFO] [stdout] 156 | | } else if result > 1.0 { [INFO] [stdout] 157 | | result = 1.0; [INFO] [stdout] 158 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:44:61 [INFO] [stdout] | [INFO] [stdout] 44 | if expected.is_nan_correct() && output.is_nan_correct() { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 45 | | true [INFO] [stdout] 46 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:46:54 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/testcase/cvt_rn_satfinite_f8x2_f32.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ____________^ [INFO] [stdout] 47 | | true [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | false [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ expected.to_bits() == output.to_bits() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/lg2.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/div.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 72 | let result = exact_f64 as f32; [INFO] [stdout] | ------------------------------ unnecessary `let` binding [INFO] [stdout] 73 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 72 ~ [INFO] [stdout] 73 ~ exact_f64 as f32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/testcase/div.rs:204:43 [INFO] [stdout] | [INFO] [stdout] 204 | DivVariant::Rnd(ref r) => format!("{}", r.as_str()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r.as_str().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/testcase/dot_product.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | .zip(b.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 105 - .zip(b.into_iter()) [INFO] [stdout] 105 + .zip(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/testcase/dot_product.rs:152:14 [INFO] [stdout] | [INFO] [stdout] 152 | .zip(b.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 152 - .zip(b.into_iter()) [INFO] [stdout] 152 + .zip(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/minmax.rs:135:33 [INFO] [stdout] | [INFO] [stdout] 135 | if a.is_nan() && b.is_nan() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 136 | | half::f16::NAN [INFO] [stdout] 137 | | } else if nan && (a.is_nan() || b.is_nan()) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/minmax.rs:137:49 [INFO] [stdout] | [INFO] [stdout] 137 | } else if nan && (a.is_nan() || b.is_nan()) { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 138 | | half::f16::NAN [INFO] [stdout] 139 | | } else if a.is_nan() { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/testcase/mul.rs:15:15 [INFO] [stdout] | [INFO] [stdout] 15 | fn to_ptx(&self) -> &'static str { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/fma_f.rs:118:79 [INFO] [stdout] | [INFO] [stdout] 118 | if (expected.to_bits() as i32).abs_diff(output.to_bits() as i32) <= 1 { [INFO] [stdout] | _______________________________________________________________________________^ [INFO] [stdout] 119 | | Ok(()) [INFO] [stdout] 120 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/fma_f.rs:120:56 [INFO] [stdout] | [INFO] [stdout] 120 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 121 | | Ok(()) [INFO] [stdout] 122 | | } else if expected == 0.0 && output == 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/fma_f.rs:152:28 [INFO] [stdout] | [INFO] [stdout] 152 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 153 | | result = 0.0; [INFO] [stdout] 154 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/fma_f.rs:154:33 [INFO] [stdout] | [INFO] [stdout] 154 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 155 | | result = 0.0; [INFO] [stdout] 156 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/fma_f.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 155 | | result = 0.0; [INFO] [stdout] 156 | | } else if result > 1.0 { [INFO] [stdout] 157 | | result = 1.0; [INFO] [stdout] 158 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/lg2.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/mul_f.rs:112:51 [INFO] [stdout] | [INFO] [stdout] 112 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 113 | | Ok(()) [INFO] [stdout] 114 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/mul_f.rs:114:56 [INFO] [stdout] | [INFO] [stdout] 114 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 115 | | Ok(()) [INFO] [stdout] 116 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/mul_f.rs:143:28 [INFO] [stdout] | [INFO] [stdout] 143 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 144 | | result = 0.0; [INFO] [stdout] 145 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/mul_f.rs:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 146 | | result = 0.0; [INFO] [stdout] 147 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/mul_f.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 146 | | result = 0.0; [INFO] [stdout] 147 | | } else if result > 1.0 { [INFO] [stdout] 148 | | result = 1.0; [INFO] [stdout] 149 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/neg.rs:37:49 [INFO] [stdout] | [INFO] [stdout] 37 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 38 | | Ok(()) [INFO] [stdout] 39 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/neg.rs:39:58 [INFO] [stdout] | [INFO] [stdout] 39 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 40 | | Ok(()) [INFO] [stdout] 41 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/minmax.rs:135:33 [INFO] [stdout] | [INFO] [stdout] 135 | if a.is_nan() && b.is_nan() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 136 | | half::f16::NAN [INFO] [stdout] 137 | | } else if nan && (a.is_nan() || b.is_nan()) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/minmax.rs:137:49 [INFO] [stdout] | [INFO] [stdout] 137 | } else if nan && (a.is_nan() || b.is_nan()) { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 138 | | half::f16::NAN [INFO] [stdout] 139 | | } else if a.is_nan() { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/testcase/mul.rs:15:15 [INFO] [stdout] | [INFO] [stdout] 15 | fn to_ptx(&self) -> &'static str { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/mul_f.rs:112:51 [INFO] [stdout] | [INFO] [stdout] 112 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 113 | | Ok(()) [INFO] [stdout] 114 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/mul_f.rs:114:56 [INFO] [stdout] | [INFO] [stdout] 114 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 115 | | Ok(()) [INFO] [stdout] 116 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/mul_f.rs:143:28 [INFO] [stdout] | [INFO] [stdout] 143 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 144 | | result = 0.0; [INFO] [stdout] 145 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/mul_f.rs:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 146 | | result = 0.0; [INFO] [stdout] 147 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/mul_f.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 146 | | result = 0.0; [INFO] [stdout] 147 | | } else if result > 1.0 { [INFO] [stdout] 148 | | result = 1.0; [INFO] [stdout] 149 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/neg.rs:37:49 [INFO] [stdout] | [INFO] [stdout] 37 | if expected.is_nan() && output.is_nan() { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 38 | | Ok(()) [INFO] [stdout] 39 | | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/neg.rs:39:58 [INFO] [stdout] | [INFO] [stdout] 39 | } else if expected.to_bits() == output.to_bits() { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 40 | | Ok(()) [INFO] [stdout] 41 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/testcase/set.rs:284:42 [INFO] [stdout] | [INFO] [stdout] 284 | integer_predicate.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/testcase/set.rs:299:42 [INFO] [stdout] | [INFO] [stdout] 299 | integer_predicate.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/sin.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sqrt.rs:46:44 [INFO] [stdout] | [INFO] [stdout] 46 | } else if self.rnd == Rounding::Rn { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 47 | | self.rnd.as_str() [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sqrt.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 49 | | self.rnd.as_str() [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/testcase/sub.rs:37:61 [INFO] [stdout] | [INFO] [stdout] 37 | TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest::default())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 37 - TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest::default())), [INFO] [stdout] 37 + TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sub_f.rs:79:51 [INFO] [stdout] | [INFO] [stdout] 79 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 80 | | Ok(()) [INFO] [stdout] 81 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sub_f.rs:81:56 [INFO] [stdout] | [INFO] [stdout] 81 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 82 | | Ok(()) [INFO] [stdout] 83 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sub_f.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 105 | | result = 0.0; [INFO] [stdout] 106 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sub_f.rs:106:33 [INFO] [stdout] | [INFO] [stdout] 106 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 107 | | result = 0.0; [INFO] [stdout] 108 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/sub_f.rs:106:16 [INFO] [stdout] | [INFO] [stdout] 106 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 107 | | result = 0.0; [INFO] [stdout] 108 | | } else if result > 1.0 { [INFO] [stdout] 109 | | result = 1.0; [INFO] [stdout] 110 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/testcase/set.rs:284:42 [INFO] [stdout] | [INFO] [stdout] 284 | integer_predicate.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/testcase/set.rs:299:42 [INFO] [stdout] | [INFO] [stdout] 299 | integer_predicate.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/vshr.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 124 | / let post_secondary_op = match config.op2 { [INFO] [stdout] 125 | | Some(SecondaryOp::Add) => saturated.wrapping_add(&c), [INFO] [stdout] ... | [INFO] [stdout] 140 | | None => saturated, [INFO] [stdout] 141 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 142 | post_secondary_op [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 124 ~ [INFO] [stdout] 125 ~ match config.op2 { [INFO] [stdout] 126 + Some(SecondaryOp::Add) => saturated.wrapping_add(&c), [INFO] [stdout] 127 + //Some(SecondaryOp::Min) => { [INFO] [stdout] 128 + // if saturated < c { [INFO] [stdout] 129 + // saturated [INFO] [stdout] 130 + // } else { [INFO] [stdout] 131 + // c [INFO] [stdout] 132 + // } [INFO] [stdout] 133 + //} [INFO] [stdout] 134 + //Some(SecondaryOp::Max) => { [INFO] [stdout] 135 + // if saturated > c { [INFO] [stdout] 136 + // saturated [INFO] [stdout] 137 + // } else { [INFO] [stdout] 138 + // c [INFO] [stdout] 139 + // } [INFO] [stdout] 140 + //} [INFO] [stdout] 141 + None => saturated, [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/vshr.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 170 | let shifted = a >> tb; [INFO] [stdout] | ---------------------- unnecessary `let` binding [INFO] [stdout] 171 | shifted [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 170 ~ [INFO] [stdout] 171 ~ a >> tb [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/testcase/sin.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | PTX.replace("", &ftz) [INFO] [stdout] | ^^^^ help: change this to: `ftz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sqrt.rs:46:44 [INFO] [stdout] | [INFO] [stdout] 46 | } else if self.rnd == Rounding::Rn { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 47 | | self.rnd.as_str() [INFO] [stdout] 48 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sqrt.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 49 | | self.rnd.as_str() [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/testcase/sub.rs:37:61 [INFO] [stdout] | [INFO] [stdout] 37 | TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest::default())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 37 - TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest::default())), [INFO] [stdout] 37 + TestCase::new("sub_sat_s32".to_string(), make_range(SubSatTest)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/testcase/mod.rs:206:30 [INFO] [stdout] | [INFO] [stdout] 206 | let mut source = format!("Program source:\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Program source:\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sub_f.rs:79:51 [INFO] [stdout] | [INFO] [stdout] 79 | if expected.to_bits() == output.to_bits() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 80 | | Ok(()) [INFO] [stdout] 81 | | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sub_f.rs:81:56 [INFO] [stdout] | [INFO] [stdout] 81 | } else if expected.is_nan() && output.is_nan() { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 82 | | Ok(()) [INFO] [stdout] 83 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/testcase/sub_f.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | if result.is_nan() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 105 | | result = 0.0; [INFO] [stdout] 106 | | } else if result <= 0.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/testcase/sub_f.rs:106:33 [INFO] [stdout] | [INFO] [stdout] 106 | } else if result <= 0.0 { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 107 | | result = 0.0; [INFO] [stdout] 108 | | } else if result > 1.0 { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/testcase/sub_f.rs:106:16 [INFO] [stdout] | [INFO] [stdout] 106 | } else if result <= 0.0 { [INFO] [stdout] | ________________^ [INFO] [stdout] 107 | | result = 0.0; [INFO] [stdout] 108 | | } else if result > 1.0 { [INFO] [stdout] 109 | | result = 1.0; [INFO] [stdout] 110 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `result = result.clamp(0.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/vshr.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 124 | / let post_secondary_op = match config.op2 { [INFO] [stdout] 125 | | Some(SecondaryOp::Add) => saturated.wrapping_add(&c), [INFO] [stdout] ... | [INFO] [stdout] 140 | | None => saturated, [INFO] [stdout] 141 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 142 | post_secondary_op [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 124 ~ [INFO] [stdout] 125 ~ match config.op2 { [INFO] [stdout] 126 + Some(SecondaryOp::Add) => saturated.wrapping_add(&c), [INFO] [stdout] 127 + //Some(SecondaryOp::Min) => { [INFO] [stdout] 128 + // if saturated < c { [INFO] [stdout] 129 + // saturated [INFO] [stdout] 130 + // } else { [INFO] [stdout] 131 + // c [INFO] [stdout] 132 + // } [INFO] [stdout] 133 + //} [INFO] [stdout] 134 + //Some(SecondaryOp::Max) => { [INFO] [stdout] 135 + // if saturated > c { [INFO] [stdout] 136 + // saturated [INFO] [stdout] 137 + // } else { [INFO] [stdout] 138 + // c [INFO] [stdout] 139 + // } [INFO] [stdout] 140 + //} [INFO] [stdout] 141 + None => saturated, [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/main.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | tests = tests.into_iter().filter(|t| re.is_match(&t.name)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tests.retain(|t| re.is_match(&t.name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/testcase/vshr.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 170 | let shifted = a >> tb; [INFO] [stdout] | ---------------------- unnecessary `let` binding [INFO] [stdout] 171 | shifted [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 170 ~ [INFO] [stdout] 171 ~ a >> tb [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/testcase/mod.rs:206:30 [INFO] [stdout] | [INFO] [stdout] 206 | let mut source = format!("Program source:\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Program source:\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/main.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | tests = tests.into_iter().filter(|t| re.is_match(&t.name)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tests.retain(|t| re.is_match(&t.name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4m 13s [INFO] running `Command { std: "docker" "inspect" "cdd7d0f3a2f0921037d27d6a1b89f2ba00fe6ddf53bef450f5b5471a2a522147", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cdd7d0f3a2f0921037d27d6a1b89f2ba00fe6ddf53bef450f5b5471a2a522147", kill_on_drop: false }` [INFO] [stdout] cdd7d0f3a2f0921037d27d6a1b89f2ba00fe6ddf53bef450f5b5471a2a522147