[INFO] updating cached repository resin-os/bindmount [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/resin-os/bindmount [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/resin-os/bindmount" "work/ex/clippy-test-run/sources/stable/gh/resin-os/bindmount"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/resin-os/bindmount'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/resin-os/bindmount" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/resin-os/bindmount"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/resin-os/bindmount'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] f597fb026636f0f1be1fbfe2f5a8c2edee3c4493 [INFO] sha for GitHub repo resin-os/bindmount: f597fb026636f0f1be1fbfe2f5a8c2edee3c4493 [INFO] validating manifest of resin-os/bindmount 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 resin-os/bindmount 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 resin-os/bindmount [INFO] finished frobbing resin-os/bindmount [INFO] frobbed toml for resin-os/bindmount written to work/ex/clippy-test-run/sources/stable/gh/resin-os/bindmount/Cargo.toml [INFO] started frobbing resin-os/bindmount [INFO] finished frobbing resin-os/bindmount [INFO] frobbed toml for resin-os/bindmount written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/resin-os/bindmount/Cargo.toml [INFO] crate resin-os/bindmount 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 resin-os/bindmount against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/resin-os/bindmount:/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] e9da442d7bc40e0cd55c1abbb2f7a5ade309edb8dd19fc5ea29b6babc6769dd6 [INFO] running `"docker" "start" "-a" "e9da442d7bc40e0cd55c1abbb2f7a5ade309edb8dd19fc5ea29b6babc6769dd6"` [INFO] [stderr] Checking errno v0.2.3 [INFO] [stderr] Checking bindmount v0.0.1 (/opt/crater/workdir) [INFO] [stderr] error: this loop never actually loops [INFO] [stderr] --> src/main.rs:81:5 [INFO] [stderr] | [INFO] [stderr] 81 | / for _ in fs::read_dir(p).unwrap() { [INFO] [stderr] 82 | | return Ok(false); [INFO] [stderr] 83 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::never_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:123:35 [INFO] [stderr] | [INFO] [stderr] 123 | fn create_mountpoint(p: &Path, t: &fs::FileType) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `fs::FileType` [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: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:205:20 [INFO] [stderr] | [INFO] [stderr] 205 | if t.ends_with("/") { [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:250:25 [INFO] [stderr] | [INFO] [stderr] 250 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 251 | | .unwrap() [INFO] [stderr] 252 | | .as_ptr(), [INFO] [stderr] | |_____________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::temporary_cstring_as_ptr)] on by default [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:250:25 [INFO] [stderr] | [INFO] [stderr] 250 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 251 | | .unwrap() [INFO] [stderr] | |_____________________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:295:13 [INFO] [stderr] | [INFO] [stderr] 295 | / CString::new(bind_mountpoint.to_str().unwrap()) [INFO] [stderr] 296 | | .unwrap() [INFO] [stderr] 297 | | .as_ptr(), [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:295:13 [INFO] [stderr] | [INFO] [stderr] 295 | / CString::new(bind_mountpoint.to_str().unwrap()) [INFO] [stderr] 296 | | .unwrap() [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:298:13 [INFO] [stderr] | [INFO] [stderr] 298 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 299 | | .unwrap() [INFO] [stderr] 300 | | .as_ptr(), [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:298:13 [INFO] [stderr] | [INFO] [stderr] 298 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 299 | | .unwrap() [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | CString::new("ext2").unwrap().as_ptr(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | CString::new("ext2").unwrap().as_ptr(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/main.rs:303:13 [INFO] [stderr] | [INFO] [stderr] 303 | 0 as *mut libc::c_void, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::zero_ptr)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] error: aborting due to 5 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `bindmount`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this loop never actually loops [INFO] [stderr] --> src/main.rs:81:5 [INFO] [stderr] | [INFO] [stderr] 81 | / for _ in fs::read_dir(p).unwrap() { [INFO] [stderr] 82 | | return Ok(false); [INFO] [stderr] 83 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::never_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:123:35 [INFO] [stderr] | [INFO] [stderr] 123 | fn create_mountpoint(p: &Path, t: &fs::FileType) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `fs::FileType` [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: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:205:20 [INFO] [stderr] | [INFO] [stderr] 205 | if t.ends_with("/") { [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:250:25 [INFO] [stderr] | [INFO] [stderr] 250 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 251 | | .unwrap() [INFO] [stderr] 252 | | .as_ptr(), [INFO] [stderr] | |_____________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::temporary_cstring_as_ptr)] on by default [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:250:25 [INFO] [stderr] | [INFO] [stderr] 250 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 251 | | .unwrap() [INFO] [stderr] | |_____________________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:295:13 [INFO] [stderr] | [INFO] [stderr] 295 | / CString::new(bind_mountpoint.to_str().unwrap()) [INFO] [stderr] 296 | | .unwrap() [INFO] [stderr] 297 | | .as_ptr(), [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:295:13 [INFO] [stderr] | [INFO] [stderr] 295 | / CString::new(bind_mountpoint.to_str().unwrap()) [INFO] [stderr] 296 | | .unwrap() [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:298:13 [INFO] [stderr] | [INFO] [stderr] 298 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 299 | | .unwrap() [INFO] [stderr] 300 | | .as_ptr(), [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:298:13 [INFO] [stderr] | [INFO] [stderr] 298 | / CString::new(root_mountpoint.to_str().unwrap()) [INFO] [stderr] 299 | | .unwrap() [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/main.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | CString::new("ext2").unwrap().as_ptr(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/main.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | CString::new("ext2").unwrap().as_ptr(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/main.rs:303:13 [INFO] [stderr] | [INFO] [stderr] 303 | 0 as *mut libc::c_void, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::zero_ptr)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] error: aborting due to 5 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `bindmount`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "e9da442d7bc40e0cd55c1abbb2f7a5ade309edb8dd19fc5ea29b6babc6769dd6"` [INFO] running `"docker" "rm" "-f" "e9da442d7bc40e0cd55c1abbb2f7a5ade309edb8dd19fc5ea29b6babc6769dd6"` [INFO] [stdout] e9da442d7bc40e0cd55c1abbb2f7a5ade309edb8dd19fc5ea29b6babc6769dd6