[INFO] crate rurel 0.1.2 is already in cache [INFO] extracting crate rurel 0.1.2 into work/ex/clippy-test-run/sources/stable/reg/rurel/0.1.2 [INFO] extracting crate rurel 0.1.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rurel/0.1.2 [INFO] validating manifest of rurel-0.1.2 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of rurel-0.1.2 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing rurel-0.1.2 [INFO] removed 0 missing examples [INFO] finished frobbing rurel-0.1.2 [INFO] frobbed toml for rurel-0.1.2 written to work/ex/clippy-test-run/sources/stable/reg/rurel/0.1.2/Cargo.toml [INFO] started frobbing rurel-0.1.2 [INFO] removed 0 missing examples [INFO] finished frobbing rurel-0.1.2 [INFO] frobbed toml for rurel-0.1.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rurel/0.1.2/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting rurel-0.1.2 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/rurel/0.1.2:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 3e26d6a514eb3ae1c723c332586aacb6eae1eb9c6ae7335c2ff7dece56561040 [INFO] running `"docker" "start" "-a" "3e26d6a514eb3ae1c723c332586aacb6eae1eb9c6ae7335c2ff7dece56561040"` [INFO] [stderr] Checking rurel v0.1.2 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/strategy/learn/q.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | alpha: alpha, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `alpha` [INFO] [stderr] --> src/strategy/learn/q.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | alpha: alpha, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `alpha` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/strategy/learn/q.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | gamma: gamma, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `gamma` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/strategy/learn/q.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | gamma: gamma, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `gamma` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/strategy/learn/q.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | initial_value: initial_value, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `initial_value` [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] --> src/strategy/learn/q.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | initial_value: initial_value, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `initial_value` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/strategy/terminate/fixed_iterations.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | iters: iters, [INFO] [stderr] --> src/strategy/terminate/fixed_iterations.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | iters: iters, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `iters` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `iters` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/lib.rs:128:18 [INFO] [stderr] | [INFO] [stderr] 128 | -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/strategy/learn/mod.rs:22:33 [INFO] [stderr] | [INFO] [stderr] 22 | new_action_values: &Option<&HashMap>, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option<&HashMap>` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/strategy/learn/mod.rs:23:29 [INFO] [stderr] | [INFO] [stderr] 23 | current_value: &Option<&f64>, [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `Option<&f64>` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `strategy::explore::random::RandomExploration` [INFO] [stderr] --> src/strategy/explore/random.rs:14:5 [INFO] [stderr] | [INFO] [stderr] 14 | / pub fn new() -> RandomExploration { [INFO] [stderr] 15 | | RandomExploration [INFO] [stderr] 16 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 11 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `AgentTrainer` [INFO] [stderr] --> src/lib.rs:102:5 [INFO] [stderr] | [INFO] [stderr] 102 | / pub fn new() -> AgentTrainer { [INFO] [stderr] 103 | | AgentTrainer { q: HashMap::new() } [INFO] [stderr] 104 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 93 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:142:46 [INFO] [stderr] | [INFO] [stderr] 142 | self.q.entry(s_t).or_insert_with(|| HashMap::new()).insert(action, v); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `HashMap::new` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/lib.rs:128:18 [INFO] [stderr] | [INFO] [stderr] 128 | -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/strategy/learn/mod.rs:22:33 [INFO] [stderr] | [INFO] [stderr] 22 | new_action_values: &Option<&HashMap>, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option<&HashMap>` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/strategy/learn/mod.rs:23:29 [INFO] [stderr] | [INFO] [stderr] 23 | current_value: &Option<&f64>, [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `Option<&f64>` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `strategy::explore::random::RandomExploration` [INFO] [stderr] --> src/strategy/explore/random.rs:14:5 [INFO] [stderr] | [INFO] [stderr] 14 | / pub fn new() -> RandomExploration { [INFO] [stderr] 15 | | RandomExploration [INFO] [stderr] 16 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 11 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `AgentTrainer` [INFO] [stderr] --> src/lib.rs:102:5 [INFO] [stderr] | [INFO] [stderr] 102 | / pub fn new() -> AgentTrainer { [INFO] [stderr] 103 | | AgentTrainer { q: HashMap::new() } [INFO] [stderr] 104 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 93 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:142:46 [INFO] [stderr] | [INFO] [stderr] 142 | self.q.entry(s_t).or_insert_with(|| HashMap::new()).insert(action, v); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `HashMap::new` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/examples/eucdist.rs:52:50 [INFO] [stderr] | [INFO] [stderr] 52 | fn take_action(&mut self, action: &MyAction) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/examples/eucdist.rs:78:45 [INFO] [stderr] | [INFO] [stderr] 78 | &mut FixedIterations::new(100000), [INFO] [stderr] | ^^^^^^ help: consider: `100_000` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/examples/eucdist.rs:33:17 [INFO] [stderr] | [INFO] [stderr] 33 | let d = (((tx - self.x).pow(2) + (ty - self.y).pow(2)) as f64).sqrt(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from((tx - self.x).pow(2) + (ty - self.y).pow(2))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/examples/eucdist.rs:53:9 [INFO] [stderr] | [INFO] [stderr] 53 | / match action { [INFO] [stderr] 54 | | &MyAction::Move { dx, dy } => { [INFO] [stderr] 55 | | self.state = MyState { [INFO] [stderr] 56 | | x: (((self.state.x + dx) % self.state.maxx) + self.state.maxx) % [INFO] [stderr] ... | [INFO] [stderr] 62 | | } [INFO] [stderr] 63 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 53 | match *action { [INFO] [stderr] 54 | MyAction::Move { dx, dy } => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.38s [INFO] running `"docker" "inspect" "3e26d6a514eb3ae1c723c332586aacb6eae1eb9c6ae7335c2ff7dece56561040"` [INFO] running `"docker" "rm" "-f" "3e26d6a514eb3ae1c723c332586aacb6eae1eb9c6ae7335c2ff7dece56561040"` [INFO] [stdout] 3e26d6a514eb3ae1c723c332586aacb6eae1eb9c6ae7335c2ff7dece56561040