[INFO] updating cached repository mwolicki/brainfuck_rust_web [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/mwolicki/brainfuck_rust_web [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/mwolicki/brainfuck_rust_web" "work/ex/clippy-test-run/sources/stable/gh/mwolicki/brainfuck_rust_web"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/mwolicki/brainfuck_rust_web'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/mwolicki/brainfuck_rust_web" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mwolicki/brainfuck_rust_web"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mwolicki/brainfuck_rust_web'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 84cb327841436e0e5435a90a230d669d81cb9544 [INFO] sha for GitHub repo mwolicki/brainfuck_rust_web: 84cb327841436e0e5435a90a230d669d81cb9544 [INFO] validating manifest of mwolicki/brainfuck_rust_web 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 mwolicki/brainfuck_rust_web 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 mwolicki/brainfuck_rust_web [INFO] finished frobbing mwolicki/brainfuck_rust_web [INFO] frobbed toml for mwolicki/brainfuck_rust_web written to work/ex/clippy-test-run/sources/stable/gh/mwolicki/brainfuck_rust_web/Cargo.toml [INFO] started frobbing mwolicki/brainfuck_rust_web [INFO] finished frobbing mwolicki/brainfuck_rust_web [INFO] frobbed toml for mwolicki/brainfuck_rust_web written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mwolicki/brainfuck_rust_web/Cargo.toml [INFO] crate mwolicki/brainfuck_rust_web 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 mwolicki/brainfuck_rust_web against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/mwolicki/brainfuck_rust_web:/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] 26ee05920eefd7ca2ecbb48966f43dc3525978fef9992c53a2ca776523e98ff2 [INFO] running `"docker" "start" "-a" "26ee05920eefd7ca2ecbb48966f43dc3525978fef9992c53a2ca776523e98ff2"` [INFO] [stderr] Checking brainfuck_webassembly v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/brainfuck.rs:80:45 [INFO] [stderr] | [INFO] [stderr] 80 | ']' => Some(Op::While { ops: ops }), [INFO] [stderr] | ^^^^^^^^ help: replace it with: `ops` [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] warning: redundant field names in struct initialization [INFO] [stderr] --> src/brainfuck.rs:80:45 [INFO] [stderr] | [INFO] [stderr] 80 | ']' => Some(Op::While { ops: ops }), [INFO] [stderr] | ^^^^^^^^ help: replace it with: `ops` [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] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/wasm.rs:111:29 [INFO] [stderr] | [INFO] [stderr] 111 | fn simple_optimasation(code:&Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Wast]` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/wasm.rs:122:40 [INFO] [stderr] | [INFO] [stderr] 122 | Wast::TeeLocal(a.clone()) [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*a` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/wasm.rs:197:33 [INFO] [stderr] | [INFO] [stderr] 197 | fn append_wasm_string(s:&String, vec: &mut Vec) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/wasm.rs:203:37 [INFO] [stderr] | [INFO] [stderr] 203 | fn import_section (imports: &Imports, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^ [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in imports.enumerate()` or similar iterators [INFO] [stderr] --> src/wasm.rs:211:60 [INFO] [stderr] | [INFO] [stderr] 211 | for &(ref module_str, ref field_str, _) in imports { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [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/wasm.rs:226:42 [INFO] [stderr] | [INFO] [stderr] 226 | fn functions_section (functions: &Functions, imports_no :u8, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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/wasm.rs:246:40 [INFO] [stderr] | [INFO] [stderr] 246 | fn exports_section (functions: &Functions, no_imports:u8, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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/wasm.rs:282:37 [INFO] [stderr] | [INFO] [stderr] 282 | fn code_section (functions: &Functions, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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/wasm.rs:111:29 [INFO] [stderr] | [INFO] [stderr] 111 | fn simple_optimasation(code:&Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Wast]` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/wasm.rs:122:40 [INFO] [stderr] | [INFO] [stderr] 122 | Wast::TeeLocal(a.clone()) [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*a` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:115:16 [INFO] [stderr] | [INFO] [stderr] 115 | fn to_c_str(s: &String) -> *mut c_char { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/wasm.rs:197:33 [INFO] [stderr] | [INFO] [stderr] 197 | fn append_wasm_string(s:&String, vec: &mut Vec) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/wasm.rs:203:37 [INFO] [stderr] | [INFO] [stderr] 203 | fn import_section (imports: &Imports, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^ [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: the variable `i` is used as a loop counter. Consider using `for (i, item) in imports.enumerate()` or similar iterators [INFO] [stderr] --> src/wasm.rs:211:60 [INFO] [stderr] | [INFO] [stderr] 211 | for &(ref module_str, ref field_str, _) in imports { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [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/wasm.rs:226:42 [INFO] [stderr] | [INFO] [stderr] 226 | fn functions_section (functions: &Functions, imports_no :u8, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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/wasm.rs:246:40 [INFO] [stderr] | [INFO] [stderr] 246 | fn exports_section (functions: &Functions, no_imports:u8, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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/wasm.rs:282:37 [INFO] [stderr] | [INFO] [stderr] 282 | fn code_section (functions: &Functions, vec: &mut Vec){ [INFO] [stderr] | ^^^^^^^^^^ [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:115:16 [INFO] [stderr] | [INFO] [stderr] 115 | fn to_c_str(s: &String) -> *mut c_char { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 0.59s [INFO] running `"docker" "inspect" "26ee05920eefd7ca2ecbb48966f43dc3525978fef9992c53a2ca776523e98ff2"` [INFO] running `"docker" "rm" "-f" "26ee05920eefd7ca2ecbb48966f43dc3525978fef9992c53a2ca776523e98ff2"` [INFO] [stdout] 26ee05920eefd7ca2ecbb48966f43dc3525978fef9992c53a2ca776523e98ff2