[INFO] crate procfs 0.4.1 is already in cache [INFO] extracting crate procfs 0.4.1 into work/ex/clippy-test-run/sources/stable/reg/procfs/0.4.1 [INFO] extracting crate procfs 0.4.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/procfs/0.4.1 [INFO] validating manifest of procfs-0.4.1 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 procfs-0.4.1 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 procfs-0.4.1 [INFO] finished frobbing procfs-0.4.1 [INFO] frobbed toml for procfs-0.4.1 written to work/ex/clippy-test-run/sources/stable/reg/procfs/0.4.1/Cargo.toml [INFO] started frobbing procfs-0.4.1 [INFO] finished frobbing procfs-0.4.1 [INFO] frobbed toml for procfs-0.4.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/procfs/0.4.1/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 procfs-0.4.1 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/reg/procfs/0.4.1:/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] c7326ab1796458a8e360d0134e33194d8216f7ae66e470b595903d25c910762e [INFO] running `"docker" "start" "-a" "c7326ab1796458a8e360d0134e33194d8216f7ae66e470b595903d25c910762e"` [INFO] [stderr] Checking libflate v0.1.19 [INFO] [stderr] Checking procfs v0.4.1 (/opt/crater/workdir) [INFO] [stderr] warning: function is never used: `convert_to_bytes` [INFO] [stderr] --> src/lib.rs:270:1 [INFO] [stderr] | [INFO] [stderr] 270 | fn convert_to_bytes(num: u64, unit: &str) -> u64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `1` [INFO] [stderr] --> src/process.rs:104:37 [INFO] [stderr] | [INFO] [stderr] 104 | const NFS_CAP_READDIRPLUS = (1 << 0); [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: unused variable: `t` [INFO] [stderr] --> src/process.rs:1456:16 [INFO] [stderr] | [INFO] [stderr] 1456 | Ok(t) => {} [INFO] [stderr] | ^ help: consider using `_t` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/lib.rs:361:5 [INFO] [stderr] | [INFO] [stderr] 361 | / pub fn from_str(s: &str) -> Result { [INFO] [stderr] 362 | | let mut s = s.split('-'); [INFO] [stderr] 363 | | let kernel = s.next().unwrap(); [INFO] [stderr] 364 | | let mut kernel_split = kernel.split('.'); [INFO] [stderr] ... | [INFO] [stderr] 384 | | }) [INFO] [stderr] 385 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: function is never used: `convert_to_bytes` [INFO] [stderr] --> src/lib.rs:270:1 [INFO] [stderr] | [INFO] [stderr] 270 | fn convert_to_bytes(num: u64, unit: &str) -> u64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> examples/ps.rs:10:63 [INFO] [stderr] | [INFO] [stderr] 10 | println!("{: >5} {: <8} {: >8} {}", "PID", "TTY", "TIME", "CMD"); [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> examples/netstat.rs:28:62 [INFO] [stderr] | [INFO] [stderr] 28 | "Local address", "Remote address", "State", "Inode", "PID/Program name" [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `1` [INFO] [stderr] --> src/process.rs:104:37 [INFO] [stderr] | [INFO] [stderr] 104 | const NFS_CAP_READDIRPLUS = (1 << 0); [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 41 [INFO] [stderr] --> src/process.rs:1466:5 [INFO] [stderr] | [INFO] [stderr] 1466 | / fn test_self_proc() { [INFO] [stderr] 1467 | | let myself = Process::myself().unwrap(); [INFO] [stderr] 1468 | | println!("{:#?}", myself); [INFO] [stderr] 1469 | | println!("state: {:?}", myself.stat.state()); [INFO] [stderr] ... | [INFO] [stderr] 1538 | | } [INFO] [stderr] 1539 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/process.rs:1601:16 [INFO] [stderr] | [INFO] [stderr] 1601 | if let Ok(_) = io { [INFO] [stderr] | _________- ^^^^^ [INFO] [stderr] 1602 | | assert!(kernel >= KernelVersion::new(2, 6, 20)); [INFO] [stderr] 1603 | | } [INFO] [stderr] | |_________- help: try this: `if io.is_ok()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/process.rs:1651:13 [INFO] [stderr] | [INFO] [stderr] 1651 | / "device /dev/md127 mounted on /boot with fstype ext2 [INFO] [stderr] 1652 | | device /dev/md124 mounted on /home with fstype ext4 [INFO] [stderr] 1653 | | device tmpfs mounted on /run/user/0 with fstype tmpfs [INFO] [stderr] 1654 | | " [INFO] [stderr] 1655 | | .as_bytes(), [INFO] [stderr] | |_______________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::string_lit_as_bytes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] help: consider using a byte string literal instead [INFO] [stderr] | [INFO] [stderr] 1651 | b"device /dev/md127 mounted on /boot with fstype ext2 [INFO] [stderr] 1652 | device /dev/md124 mounted on /home with fstype ext4 [INFO] [stderr] 1653 | device tmpfs mounted on /run/user/0 with fstype tmpfs [INFO] [stderr] 1654 | ", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/process.rs:1678:49 [INFO] [stderr] | [INFO] [stderr] 1678 | let mountstats = MountStat::from_reader("device elwe:/space mounted on /srv/elwe/space with fstype nfs4 statvers=1.1 [INFO] [stderr] | _________________________________________________^ [INFO] [stderr] 1679 | | opts: rw,vers=4.1,rsize=131072,wsize=131072,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5,clientaddr=10.0.1.77,local_lock=none [INFO] [stderr] 1680 | | age: 3542 [INFO] [stderr] 1681 | | impl_id: name='',domain='',date='0,0' [INFO] [stderr] ... | [INFO] [stderr] 1694 | | OPEN: 1 1 0 320 420 0 124 124 [INFO] [stderr] 1695 | | ".as_bytes()); [INFO] [stderr] | |____________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] help: consider using a byte string literal instead [INFO] [stderr] | [INFO] [stderr] 1678 | let mountstats = MountStat::from_reader(b"device elwe:/space mounted on /srv/elwe/space with fstype nfs4 statvers=1.1 [INFO] [stderr] 1679 | opts: rw,vers=4.1,rsize=131072,wsize=131072,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5,clientaddr=10.0.1.77,local_lock=none [INFO] [stderr] 1680 | age: 3542 [INFO] [stderr] 1681 | impl_id: name='',domain='',date='0,0' [INFO] [stderr] 1682 | caps: caps=0x3ffdf,wtmult=512,dtsize=32768,bsize=0,namlen=255 [INFO] [stderr] 1683 | nfsv4: bm0=0xfdffbfff,bm1=0x40f9be3e,bm2=0x803,acl=0x3,sessions,pnfs=not configured [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 80 [INFO] [stderr] --> src/meminfo.rs:370:5 [INFO] [stderr] | [INFO] [stderr] 370 | / fn test_meminfo() { [INFO] [stderr] 371 | | // TRAVIS [INFO] [stderr] 372 | | // we don't have access to the kernel_config on travis, so skip that test there [INFO] [stderr] 373 | | match ::std::env::var("TRAVIS") { [INFO] [stderr] ... | [INFO] [stderr] 531 | | } [INFO] [stderr] 532 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/lib.rs:361:5 [INFO] [stderr] | [INFO] [stderr] 361 | / pub fn from_str(s: &str) -> Result { [INFO] [stderr] 362 | | let mut s = s.split('-'); [INFO] [stderr] 363 | | let kernel = s.next().unwrap(); [INFO] [stderr] 364 | | let mut kernel_split = kernel.split('.'); [INFO] [stderr] ... | [INFO] [stderr] 384 | | }) [INFO] [stderr] 385 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 9.98s [INFO] running `"docker" "inspect" "c7326ab1796458a8e360d0134e33194d8216f7ae66e470b595903d25c910762e"` [INFO] running `"docker" "rm" "-f" "c7326ab1796458a8e360d0134e33194d8216f7ae66e470b595903d25c910762e"` [INFO] [stdout] c7326ab1796458a8e360d0134e33194d8216f7ae66e470b595903d25c910762e