[INFO] crate charset 0.1.2 is already in cache [INFO] extracting crate charset 0.1.2 into work/ex/clippy-test-run/sources/stable/reg/charset/0.1.2 [INFO] extracting crate charset 0.1.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/charset/0.1.2 [INFO] validating manifest of charset-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 charset-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 charset-0.1.2 [INFO] finished frobbing charset-0.1.2 [INFO] frobbed toml for charset-0.1.2 written to work/ex/clippy-test-run/sources/stable/reg/charset/0.1.2/Cargo.toml [INFO] started frobbing charset-0.1.2 [INFO] finished frobbing charset-0.1.2 [INFO] frobbed toml for charset-0.1.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/charset/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 charset-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-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/charset/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] d45e1e24403e8446595c1599f9f6907facfae95b509ab2b2444390a5022ab8d1 [INFO] running `"docker" "start" "-a" "d45e1e24403e8446595c1599f9f6907facfae95b509ab2b2444390a5022ab8d1"` [INFO] [stderr] Checking charset v0.1.2 (/opt/crater/workdir) [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:115:1 [INFO] [stderr] | [INFO] [stderr] 115 | / pub fn decode_latin1<'a>(bytes: &'a [u8]) -> Cow<'a, str> { [INFO] [stderr] 116 | | encoding_rs::mem::decode_latin1(bytes) [INFO] [stderr] 117 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:127:1 [INFO] [stderr] | [INFO] [stderr] 127 | / pub fn decode_ascii<'a>(bytes: &'a [u8]) -> Cow<'a, str> { [INFO] [stderr] 128 | | let up_to = Encoding::ascii_valid_up_to(bytes); [INFO] [stderr] 129 | | // >= makes later things optimize better than == [INFO] [stderr] 130 | | if up_to >= bytes.len() { [INFO] [stderr] ... | [INFO] [stderr] 146 | | Cow::Owned(unsafe { String::from_utf8_unchecked(vec) }) [INFO] [stderr] 147 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:139:20 [INFO] [stderr] | [INFO] [stderr] 139 | for &b in tail.into_iter() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:308:5 [INFO] [stderr] | [INFO] [stderr] 308 | / pub fn decode<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, Charset, bool) { [INFO] [stderr] 309 | | let (charset, without_bom) = match Charset::for_bom(bytes) { [INFO] [stderr] 310 | | Some((charset, bom_length)) => (charset, &bytes[bom_length..]), [INFO] [stderr] 311 | | None => (self, bytes), [INFO] [stderr] ... | [INFO] [stderr] 314 | | (cow, charset, had_errors) [INFO] [stderr] 315 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:338:5 [INFO] [stderr] | [INFO] [stderr] 338 | / pub fn decode_with_bom_removal<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 339 | | match self.variant { [INFO] [stderr] 340 | | VariantCharset::Encoding(encoding) => encoding.decode_with_bom_removal(bytes), [INFO] [stderr] 341 | | VariantCharset::Utf7 => decode_utf7(bytes), [INFO] [stderr] 342 | | } [INFO] [stderr] 343 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:366:5 [INFO] [stderr] | [INFO] [stderr] 366 | / pub fn decode_without_bom_handling<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 367 | | match self.variant { [INFO] [stderr] 368 | | VariantCharset::Encoding(encoding) => encoding.decode_without_bom_handling(bytes), [INFO] [stderr] 369 | | VariantCharset::Utf7 => decode_utf7(bytes), [INFO] [stderr] 370 | | } [INFO] [stderr] 371 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:426:26 [INFO] [stderr] | [INFO] [stderr] 426 | let mut iter = label.into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:457:25 [INFO] [stderr] | [INFO] [stderr] 457 | iter = (&tail[4..]).into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:478:29 [INFO] [stderr] | [INFO] [stderr] 478 | for (i, &byte) in bytes.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:488:29 [INFO] [stderr] | [INFO] [stderr] 488 | for (i, &byte) in bytes.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:560:1 [INFO] [stderr] | [INFO] [stderr] 560 | / fn decode_utf7<'a>(bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 561 | | let up_to = utf7_ascii_up_to(bytes); [INFO] [stderr] 562 | | if up_to == bytes.len() { [INFO] [stderr] 563 | | let s: &str = unsafe { std::str::from_utf8_unchecked(bytes) }; [INFO] [stderr] ... | [INFO] [stderr] 615 | | } [INFO] [stderr] 616 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:115:1 [INFO] [stderr] | [INFO] [stderr] 115 | / pub fn decode_latin1<'a>(bytes: &'a [u8]) -> Cow<'a, str> { [INFO] [stderr] 116 | | encoding_rs::mem::decode_latin1(bytes) [INFO] [stderr] 117 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:127:1 [INFO] [stderr] | [INFO] [stderr] 127 | / pub fn decode_ascii<'a>(bytes: &'a [u8]) -> Cow<'a, str> { [INFO] [stderr] 128 | | let up_to = Encoding::ascii_valid_up_to(bytes); [INFO] [stderr] 129 | | // >= makes later things optimize better than == [INFO] [stderr] 130 | | if up_to >= bytes.len() { [INFO] [stderr] ... | [INFO] [stderr] 146 | | Cow::Owned(unsafe { String::from_utf8_unchecked(vec) }) [INFO] [stderr] 147 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:139:20 [INFO] [stderr] | [INFO] [stderr] 139 | for &b in tail.into_iter() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:308:5 [INFO] [stderr] | [INFO] [stderr] 308 | / pub fn decode<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, Charset, bool) { [INFO] [stderr] 309 | | let (charset, without_bom) = match Charset::for_bom(bytes) { [INFO] [stderr] 310 | | Some((charset, bom_length)) => (charset, &bytes[bom_length..]), [INFO] [stderr] 311 | | None => (self, bytes), [INFO] [stderr] ... | [INFO] [stderr] 314 | | (cow, charset, had_errors) [INFO] [stderr] 315 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:338:5 [INFO] [stderr] | [INFO] [stderr] 338 | / pub fn decode_with_bom_removal<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 339 | | match self.variant { [INFO] [stderr] 340 | | VariantCharset::Encoding(encoding) => encoding.decode_with_bom_removal(bytes), [INFO] [stderr] 341 | | VariantCharset::Utf7 => decode_utf7(bytes), [INFO] [stderr] 342 | | } [INFO] [stderr] 343 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:366:5 [INFO] [stderr] | [INFO] [stderr] 366 | / pub fn decode_without_bom_handling<'a>(self, bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 367 | | match self.variant { [INFO] [stderr] 368 | | VariantCharset::Encoding(encoding) => encoding.decode_without_bom_handling(bytes), [INFO] [stderr] 369 | | VariantCharset::Utf7 => decode_utf7(bytes), [INFO] [stderr] 370 | | } [INFO] [stderr] 371 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:426:26 [INFO] [stderr] | [INFO] [stderr] 426 | let mut iter = label.into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:457:25 [INFO] [stderr] | [INFO] [stderr] 457 | iter = (&tail[4..]).into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:478:29 [INFO] [stderr] | [INFO] [stderr] 478 | for (i, &byte) in bytes.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:488:29 [INFO] [stderr] | [INFO] [stderr] 488 | for (i, &byte) in bytes.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lib.rs:560:1 [INFO] [stderr] | [INFO] [stderr] 560 | / fn decode_utf7<'a>(bytes: &'a [u8]) -> (Cow<'a, str>, bool) { [INFO] [stderr] 561 | | let up_to = utf7_ascii_up_to(bytes); [INFO] [stderr] 562 | | if up_to == bytes.len() { [INFO] [stderr] 563 | | let s: &str = unsafe { std::str::from_utf8_unchecked(bytes) }; [INFO] [stderr] ... | [INFO] [stderr] 615 | | } [INFO] [stderr] 616 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 78 [INFO] [stderr] --> src/lib.rs:714:5 [INFO] [stderr] | [INFO] [stderr] 714 | / fn test_utf7_decode() { [INFO] [stderr] 715 | | assert_eq!(utf7_no_err(b""), ""); [INFO] [stderr] 716 | | assert_eq!(utf7_no_err(b"ab"), "ab"); [INFO] [stderr] 717 | | assert_eq!(utf7_no_err(b"+-"), "+"); [INFO] [stderr] ... | [INFO] [stderr] 811 | | assert_eq!(utf7_err(b"+AGHcqQ "), "a\u{FFFD} "); [INFO] [stderr] 812 | | } [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] Finished dev [unoptimized + debuginfo] target(s) in 2.22s [INFO] running `"docker" "inspect" "d45e1e24403e8446595c1599f9f6907facfae95b509ab2b2444390a5022ab8d1"` [INFO] running `"docker" "rm" "-f" "d45e1e24403e8446595c1599f9f6907facfae95b509ab2b2444390a5022ab8d1"` [INFO] [stdout] d45e1e24403e8446595c1599f9f6907facfae95b509ab2b2444390a5022ab8d1