[INFO] updating cached repository maxfierke/elevators [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/maxfierke/elevators [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/maxfierke/elevators" "work/ex/clippy-test-run/sources/stable/gh/maxfierke/elevators"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/maxfierke/elevators'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/maxfierke/elevators" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/maxfierke/elevators"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/maxfierke/elevators'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 64ce330536e8376708ea074646f56cd15f234dab [INFO] sha for GitHub repo maxfierke/elevators: 64ce330536e8376708ea074646f56cd15f234dab [INFO] validating manifest of maxfierke/elevators 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 maxfierke/elevators 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 maxfierke/elevators [INFO] finished frobbing maxfierke/elevators [INFO] frobbed toml for maxfierke/elevators written to work/ex/clippy-test-run/sources/stable/gh/maxfierke/elevators/Cargo.toml [INFO] started frobbing maxfierke/elevators [INFO] finished frobbing maxfierke/elevators [INFO] frobbed toml for maxfierke/elevators written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/maxfierke/elevators/Cargo.toml [INFO] crate maxfierke/elevators has a lockfile. skipping [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 maxfierke/elevators against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/maxfierke/elevators:/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] af8ae62d959dca7de0b3ac5e771be888f5934cd665c13e3d4be699eda5f45956 [INFO] running `"docker" "start" "-a" "af8ae62d959dca7de0b3ac5e771be888f5934cd665c13e3d4be699eda5f45956"` [INFO] [stderr] Checking elevators v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/elevator.rs:213:5 [INFO] [stderr] | [INFO] [stderr] 213 | thread [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/elevator.rs:190:18 [INFO] [stderr] | [INFO] [stderr] 190 | let thread = thread::spawn(move || { [INFO] [stderr] | __________________^ [INFO] [stderr] 191 | | let mut elevator = Elevator::new(id, current_floor, floors); [INFO] [stderr] 192 | | [INFO] [stderr] 193 | | loop { [INFO] [stderr] ... | [INFO] [stderr] 210 | | } [INFO] [stderr] 211 | | }); [INFO] [stderr] | |______^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `SetDirection` [INFO] [stderr] --> src/elevator.rs:57:5 [INFO] [stderr] | [INFO] [stderr] 57 | SetDirection(ElevatorDirection), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `GoToFloor` [INFO] [stderr] --> src/elevator.rs:58:5 [INFO] [stderr] | [INFO] [stderr] 58 | GoToFloor(Floor), [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field is never used: `floors` [INFO] [stderr] --> src/elevator.rs:93:3 [INFO] [stderr] | [INFO] [stderr] 93 | floors: &'static Vec [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:97:57 [INFO] [stderr] | [INFO] [stderr] 97 | pub fn new(size: usize, default_floor: Floor, floors: &'static Vec) -> Elevators { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise [INFO] [stderr] --> src/elevator.rs:116:20 [INFO] [stderr] | [INFO] [stderr] 116 | let elevator = self.elevators.get(0).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&self.elevators[0]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/elevator.rs:117:44 [INFO] [stderr] | [INFO] [stderr] 117 | elevator.sender.send(Message::NewOrder(order.clone())).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `order` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:178:55 [INFO] [stderr] | [INFO] [stderr] 178 | pub fn new(id: usize, current_floor: Floor, floors: &'static Vec) -> Elevator { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:189:98 [INFO] [stderr] | [INFO] [stderr] 189 | pub fn spawn(id: usize, receiver: Arc>>, current_floor: Floor, floors: &'static Vec) -> thread::JoinHandle<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:37:29 [INFO] [stderr] | [INFO] [stderr] 37 | fn gen_random_order(floors: &Vec) -> Order { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/elevator.rs:213:5 [INFO] [stderr] | [INFO] [stderr] 213 | thread [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/elevator.rs:190:18 [INFO] [stderr] | [INFO] [stderr] 190 | let thread = thread::spawn(move || { [INFO] [stderr] | __________________^ [INFO] [stderr] 191 | | let mut elevator = Elevator::new(id, current_floor, floors); [INFO] [stderr] 192 | | [INFO] [stderr] 193 | | loop { [INFO] [stderr] ... | [INFO] [stderr] 210 | | } [INFO] [stderr] 211 | | }); [INFO] [stderr] | |______^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `SetDirection` [INFO] [stderr] --> src/elevator.rs:57:5 [INFO] [stderr] | [INFO] [stderr] 57 | SetDirection(ElevatorDirection), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `GoToFloor` [INFO] [stderr] --> src/elevator.rs:58:5 [INFO] [stderr] | [INFO] [stderr] 58 | GoToFloor(Floor), [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field is never used: `floors` [INFO] [stderr] --> src/elevator.rs:93:3 [INFO] [stderr] | [INFO] [stderr] 93 | floors: &'static Vec [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:97:57 [INFO] [stderr] | [INFO] [stderr] 97 | pub fn new(size: usize, default_floor: Floor, floors: &'static Vec) -> Elevators { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise [INFO] [stderr] --> src/elevator.rs:116:20 [INFO] [stderr] | [INFO] [stderr] 116 | let elevator = self.elevators.get(0).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&self.elevators[0]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/elevator.rs:117:44 [INFO] [stderr] | [INFO] [stderr] 117 | elevator.sender.send(Message::NewOrder(order.clone())).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `order` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:178:55 [INFO] [stderr] | [INFO] [stderr] 178 | pub fn new(id: usize, current_floor: Floor, floors: &'static Vec) -> Elevator { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/elevator.rs:189:98 [INFO] [stderr] | [INFO] [stderr] 189 | pub fn spawn(id: usize, receiver: Arc>>, current_floor: Floor, floors: &'static Vec) -> thread::JoinHandle<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:37:29 [INFO] [stderr] | [INFO] [stderr] 37 | fn gen_random_order(floors: &Vec) -> Order { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Floor]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.05s [INFO] running `"docker" "inspect" "af8ae62d959dca7de0b3ac5e771be888f5934cd665c13e3d4be699eda5f45956"` [INFO] running `"docker" "rm" "-f" "af8ae62d959dca7de0b3ac5e771be888f5934cd665c13e3d4be699eda5f45956"` [INFO] [stdout] af8ae62d959dca7de0b3ac5e771be888f5934cd665c13e3d4be699eda5f45956