[INFO] crate rust_swig 0.1.5 is already in cache [INFO] extracting crate rust_swig 0.1.5 into work/ex/clippy-test-run/sources/stable/reg/rust_swig/0.1.5 [INFO] extracting crate rust_swig 0.1.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rust_swig/0.1.5 [INFO] validating manifest of rust_swig-0.1.5 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 rust_swig-0.1.5 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 rust_swig-0.1.5 [INFO] finished frobbing rust_swig-0.1.5 [INFO] frobbed toml for rust_swig-0.1.5 written to work/ex/clippy-test-run/sources/stable/reg/rust_swig/0.1.5/Cargo.toml [INFO] started frobbing rust_swig-0.1.5 [INFO] finished frobbing rust_swig-0.1.5 [INFO] frobbed toml for rust_swig-0.1.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rust_swig/0.1.5/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 rust_swig-0.1.5 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/reg/rust_swig/0.1.5:/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] bd45a9c62048bc5a60ae8cabc657b4529485acd5f2804ce2f5bc7676d23d101d [INFO] running `"docker" "start" "-a" "bd45a9c62048bc5a60ae8cabc657b4529485acd5f2804ce2f5bc7676d23d101d"` [INFO] [stderr] Checking jni-sys v0.3.0 [INFO] [stderr] Checking syntex_pos v0.58.1 [INFO] [stderr] Compiling rust_swig v0.1.5 (/opt/crater/workdir) [INFO] [stderr] Checking syntex_errors v0.58.1 [INFO] [stderr] Checking syntex_syntax v0.58.1 [INFO] [stderr] Checking syntex v0.58.1 [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:34:9 [INFO] [stderr] | [INFO] [stderr] 34 | / write!( [INFO] [stderr] 35 | | file, [INFO] [stderr] 36 | | "{doc_comments}{item_name} = {index}{separator}\n", [INFO] [stderr] 37 | | item_name = item.name, [INFO] [stderr] ... | [INFO] [stderr] 44 | | }, [INFO] [stderr] 45 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:48:5 [INFO] [stderr] | [INFO] [stderr] 48 | write!(file, "}};\n").map_err(&map_write_err)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:157:9 [INFO] [stderr] | [INFO] [stderr] 157 | / write!( [INFO] [stderr] 158 | | &mut cpp_fill_c_interface_struct, [INFO] [stderr] 159 | | " ret.{method_name} = c_{method_name};\n", [INFO] [stderr] 160 | | method_name = method.name, [INFO] [stderr] 161 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/mod.rs:1195:9 [INFO] [stderr] | [INFO] [stderr] 1195 | / write!( [INFO] [stderr] 1196 | | &mut code, [INFO] [stderr] 1197 | | "{index} => {item_name},\n", [INFO] [stderr] 1198 | | index = i, [INFO] [stderr] 1199 | | item_name = item.rust_name [INFO] [stderr] 1200 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/mod.rs:1224:9 [INFO] [stderr] | [INFO] [stderr] 1224 | / write!( [INFO] [stderr] 1225 | | &mut code, [INFO] [stderr] 1226 | | "{index} => {item_name},\n", [INFO] [stderr] 1227 | | index = i, [INFO] [stderr] 1228 | | item_name = item.rust_name [INFO] [stderr] 1229 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/java_jni/java_code.rs:44:9 [INFO] [stderr] | [INFO] [stderr] 44 | / write!( [INFO] [stderr] 45 | | file, [INFO] [stderr] 46 | | "{doc_comments}{item_name}({index}){separator}\n", [INFO] [stderr] 47 | | item_name = item.name, [INFO] [stderr] ... | [INFO] [stderr] 54 | | }, [INFO] [stderr] 55 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/java_jni/rust_code.rs:327:9 [INFO] [stderr] | [INFO] [stderr] 327 | / write!( [INFO] [stderr] 328 | | &mut code, [INFO] [stderr] 329 | | "{index} => {item_name},\n", [INFO] [stderr] 330 | | index = i, [INFO] [stderr] 331 | | item_name = item.rust_name [INFO] [stderr] 332 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:34:9 [INFO] [stderr] | [INFO] [stderr] 34 | / write!( [INFO] [stderr] 35 | | file, [INFO] [stderr] 36 | | "{doc_comments}{item_name} = {index}{separator}\n", [INFO] [stderr] 37 | | item_name = item.name, [INFO] [stderr] ... | [INFO] [stderr] 44 | | }, [INFO] [stderr] 45 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:48:5 [INFO] [stderr] | [INFO] [stderr] 48 | write!(file, "}};\n").map_err(&map_write_err)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/my_ast.rs:51:13 [INFO] [stderr] | [INFO] [stderr] 51 | ty: ty, [INFO] [stderr] | ^^^^^^ help: replace it with: `ty` [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/cpp_code.rs:157:9 [INFO] [stderr] | [INFO] [stderr] 157 | / write!( [INFO] [stderr] 158 | | &mut cpp_fill_c_interface_struct, [INFO] [stderr] 159 | | " ret.{method_name} = c_{method_name};\n", [INFO] [stderr] 160 | | method_name = method.name, [INFO] [stderr] 161 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/my_ast.rs:576:17 [INFO] [stderr] | [INFO] [stderr] 576 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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/parsing.rs:442:13 [INFO] [stderr] | [INFO] [stderr] 442 | may_return_error: may_return_error, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `may_return_error` [INFO] [stderr] | [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/parsing.rs:513:13 [INFO] [stderr] | [INFO] [stderr] 513 | span: span, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stderr] | [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/types_conv_map/utils.rs:111:29 [INFO] [stderr] | [INFO] [stderr] 111 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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/types_conv_map/utils.rs:122:29 [INFO] [stderr] | [INFO] [stderr] 122 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/types_conv_map/mod.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | write!(f, "\n")?; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/mod.rs:1195:9 [INFO] [stderr] | [INFO] [stderr] 1195 | / write!( [INFO] [stderr] 1196 | | &mut code, [INFO] [stderr] 1197 | | "{index} => {item_name},\n", [INFO] [stderr] 1198 | | index = i, [INFO] [stderr] 1199 | | item_name = item.rust_name [INFO] [stderr] 1200 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/cpp/mod.rs:1224:9 [INFO] [stderr] | [INFO] [stderr] 1224 | / write!( [INFO] [stderr] 1225 | | &mut code, [INFO] [stderr] 1226 | | "{index} => {item_name},\n", [INFO] [stderr] 1227 | | index = i, [INFO] [stderr] 1228 | | item_name = item.rust_name [INFO] [stderr] 1229 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/java_jni/java_code.rs:44:9 [INFO] [stderr] | [INFO] [stderr] 44 | / write!( [INFO] [stderr] 45 | | file, [INFO] [stderr] 46 | | "{doc_comments}{item_name}({index}){separator}\n", [INFO] [stderr] 47 | | item_name = item.name, [INFO] [stderr] ... | [INFO] [stderr] 54 | | }, [INFO] [stderr] 55 | | ).map_err(&map_write_err)?; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/java_jni/rust_code.rs:327:9 [INFO] [stderr] | [INFO] [stderr] 327 | / write!( [INFO] [stderr] 328 | | &mut code, [INFO] [stderr] 329 | | "{index} => {item_name},\n", [INFO] [stderr] 330 | | index = i, [INFO] [stderr] 331 | | item_name = item.rust_name [INFO] [stderr] 332 | | ).unwrap(); [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/my_ast.rs:51:13 [INFO] [stderr] | [INFO] [stderr] 51 | ty: ty, [INFO] [stderr] | ^^^^^^ help: replace it with: `ty` [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/my_ast.rs:576:17 [INFO] [stderr] | [INFO] [stderr] 576 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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/parsing.rs:442:13 [INFO] [stderr] | [INFO] [stderr] 442 | may_return_error: may_return_error, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `may_return_error` [INFO] [stderr] | [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/parsing.rs:513:13 [INFO] [stderr] | [INFO] [stderr] 513 | span: span, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stderr] | [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/types_conv_map/utils.rs:111:29 [INFO] [stderr] | [INFO] [stderr] 111 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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/types_conv_map/utils.rs:122:29 [INFO] [stderr] | [INFO] [stderr] 122 | mutbl: mutbl, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `mutbl` [INFO] [stderr] | [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/types_conv_map/mod.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | write!(f, "\n")?; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/cpp/map_type.rs:369:30 [INFO] [stderr] | [INFO] [stderr] 369 | input_converter: format!("{}", FROM_VAR_TEMPLATE), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `FROM_VAR_TEMPLATE.to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/cpp/map_type.rs:884:5 [INFO] [stderr] | [INFO] [stderr] 884 | / let mut conv: &'static str = ""; [INFO] [stderr] 885 | | if conv_map.is_this_exported_enum(opt_ty).is_some() { [INFO] [stderr] 886 | | conv = "static_cast"; [INFO] [stderr] 887 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let conv = if conv_map.is_this_exported_enum(opt_ty).is_some() { "static_cast" } else { "" };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/cpp/map_type.rs:964:31 [INFO] [stderr] | [INFO] [stderr] 964 | if let Some(fclass) = conv_map [INFO] [stderr] | _______________________________^ [INFO] [stderr] 965 | | .find_foreigner_class_with_such_self_type(under_ref_ty, false) [INFO] [stderr] 966 | | .map(|v| v.clone()) [INFO] [stderr] | |_______________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 964 | if let Some(fclass) = conv_map [INFO] [stderr] 965 | .find_foreigner_class_with_such_self_type(under_ref_ty, false).cloned() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/java_jni/rust_code.rs:849:19 [INFO] [stderr] | [INFO] [stderr] 849 | let sig = JAVA_TYPE_NAMES_FOR_JNI_SIGNATURE [INFO] [stderr] | ___________________^ [INFO] [stderr] 850 | | .get(&*arg.as_ref().name.as_str()) [INFO] [stderr] 851 | | .map(|v| *v) [INFO] [stderr] | |________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 849 | let sig = JAVA_TYPE_NAMES_FOR_JNI_SIGNATURE [INFO] [stderr] 850 | .get(&*arg.as_ref().name.as_str()).cloned() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/my_ast.rs:115:67 [INFO] [stderr] | [INFO] [stderr] 115 | if trait_bounds.get(key).map_or(false, |requires| { [INFO] [stderr] | ___________________________________________________________________^ [INFO] [stderr] 116 | | let val_name = Symbol::intern(&normalized_ty_string(val)); [INFO] [stderr] 117 | | others(val_name).map_or(true, |rt| !requires.is_subset(&rt.implements)) [INFO] [stderr] 118 | | }) { [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 32 [INFO] [stderr] --> src/parsing.rs:176:1 [INFO] [stderr] | [INFO] [stderr] 176 | / pub(crate) fn parse_foreigner_class( [INFO] [stderr] 177 | | cx: &ExtCtxt, [INFO] [stderr] 178 | | config: &LanguageConfig, [INFO] [stderr] 179 | | tokens: &[TokenTree], [INFO] [stderr] ... | [INFO] [stderr] 460 | | }) [INFO] [stderr] 461 | | } [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/parsing.rs:234:9 [INFO] [stderr] | [INFO] [stderr] 234 | / let mut access = MethodAccess::Public; [INFO] [stderr] 235 | | if parser.eat_contextual_keyword(private_keyword) { [INFO] [stderr] 236 | | access = MethodAccess::Private; [INFO] [stderr] 237 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let access = if parser.eat_contextual_keyword(private_keyword) { MethodAccess::Private } else { MethodAccess::Public };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/types_conv_map/parsing.rs:24:1 [INFO] [stderr] | [INFO] [stderr] 24 | / pub(in types_conv_map) fn parse_types_conv_map<'a>( [INFO] [stderr] 25 | | sess: &'a ParseSess, [INFO] [stderr] 26 | | name: &str, [INFO] [stderr] 27 | | code: &str, [INFO] [stderr] ... | [INFO] [stderr] 375 | | }) [INFO] [stderr] 376 | | } [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/types_conv_map/utils.rs:118:27 [INFO] [stderr] | [INFO] [stderr] 118 | span: self_type.span.clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.span` [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: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/types_conv_map/mod.rs:233:5 [INFO] [stderr] | [INFO] [stderr] 233 | / pub(crate) fn map_through_conversation_to_foreign( [INFO] [stderr] 234 | | &mut self, [INFO] [stderr] 235 | | rust_ty: &ast::Ty, [INFO] [stderr] 236 | | direction: petgraph::Direction, [INFO] [stderr] ... | [INFO] [stderr] 378 | | ret [INFO] [stderr] 379 | | } [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:164:21 [INFO] [stderr] | [INFO] [stderr] 164 | fn is_read_only(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:238:14 [INFO] [stderr] | [INFO] [stderr] 238 | .unwrap_or(Symbol::intern("")) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| Symbol::intern(""))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/lib.rs:584:13 [INFO] [stderr] | [INFO] [stderr] 584 | Err(_) => { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/cpp/map_type.rs:369:30 [INFO] [stderr] | [INFO] [stderr] 369 | input_converter: format!("{}", FROM_VAR_TEMPLATE), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `FROM_VAR_TEMPLATE.to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/cpp/map_type.rs:884:5 [INFO] [stderr] | [INFO] [stderr] 884 | / let mut conv: &'static str = ""; [INFO] [stderr] 885 | | if conv_map.is_this_exported_enum(opt_ty).is_some() { [INFO] [stderr] 886 | | conv = "static_cast"; [INFO] [stderr] 887 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let conv = if conv_map.is_this_exported_enum(opt_ty).is_some() { "static_cast" } else { "" };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/cpp/map_type.rs:964:31 [INFO] [stderr] | [INFO] [stderr] 964 | if let Some(fclass) = conv_map [INFO] [stderr] | _______________________________^ [INFO] [stderr] 965 | | .find_foreigner_class_with_such_self_type(under_ref_ty, false) [INFO] [stderr] 966 | | .map(|v| v.clone()) [INFO] [stderr] | |_______________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 964 | if let Some(fclass) = conv_map [INFO] [stderr] 965 | .find_foreigner_class_with_such_self_type(under_ref_ty, false).cloned() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/java_jni/rust_code.rs:849:19 [INFO] [stderr] | [INFO] [stderr] 849 | let sig = JAVA_TYPE_NAMES_FOR_JNI_SIGNATURE [INFO] [stderr] | ___________________^ [INFO] [stderr] 850 | | .get(&*arg.as_ref().name.as_str()) [INFO] [stderr] 851 | | .map(|v| *v) [INFO] [stderr] | |________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 849 | let sig = JAVA_TYPE_NAMES_FOR_JNI_SIGNATURE [INFO] [stderr] 850 | .get(&*arg.as_ref().name.as_str()).cloned() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/my_ast.rs:115:67 [INFO] [stderr] | [INFO] [stderr] 115 | if trait_bounds.get(key).map_or(false, |requires| { [INFO] [stderr] | ___________________________________________________________________^ [INFO] [stderr] 116 | | let val_name = Symbol::intern(&normalized_ty_string(val)); [INFO] [stderr] 117 | | others(val_name).map_or(true, |rt| !requires.is_subset(&rt.implements)) [INFO] [stderr] 118 | | }) { [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:437:54 [INFO] [stderr] | [INFO] [stderr] 437 | ((since_unix_epoch.subsec_nanos() / 1000000) as u64)) as [INFO] [stderr] | ^^^^^^^ help: consider: `1_000_000` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 32 [INFO] [stderr] --> src/parsing.rs:176:1 [INFO] [stderr] | [INFO] [stderr] 176 | / pub(crate) fn parse_foreigner_class( [INFO] [stderr] 177 | | cx: &ExtCtxt, [INFO] [stderr] 178 | | config: &LanguageConfig, [INFO] [stderr] 179 | | tokens: &[TokenTree], [INFO] [stderr] ... | [INFO] [stderr] 460 | | }) [INFO] [stderr] 461 | | } [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/parsing.rs:234:9 [INFO] [stderr] | [INFO] [stderr] 234 | / let mut access = MethodAccess::Public; [INFO] [stderr] 235 | | if parser.eat_contextual_keyword(private_keyword) { [INFO] [stderr] 236 | | access = MethodAccess::Private; [INFO] [stderr] 237 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let access = if parser.eat_contextual_keyword(private_keyword) { MethodAccess::Private } else { MethodAccess::Public };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: casting u8 to i16 may become silently lossy if types change [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:338:31 [INFO] [stderr] | [INFO] [stderr] 338 | if self < 0 || self > (::std::u8::MAX as jshort) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i16::from(::std::u8::MAX)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u16 to i32 may become silently lossy if types change [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:356:31 [INFO] [stderr] | [INFO] [stderr] 356 | if self < 0 || self > (::std::u16::MAX as jint) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::from(::std::u16::MAX)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to i64 may become silently lossy if types change [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:374:31 [INFO] [stderr] | [INFO] [stderr] 374 | if self < 0 || self > (::std::u32::MAX as jlong) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::from(::std::u32::MAX)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:437:18 [INFO] [stderr] | [INFO] [stderr] 437 | ((since_unix_epoch.subsec_nanos() / 1000000) as u64)) as [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u64::from(since_unix_epoch.subsec_nanos() / 1000000)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: Calling `subsec_millis()` is more concise than this calculation [INFO] [stderr] --> /opt/crater/target/debug/build/rust_swig-e260bab197240c80/out/jni-include.rs:437:19 [INFO] [stderr] | [INFO] [stderr] 437 | ((since_unix_epoch.subsec_nanos() / 1000000) as u64)) as [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `since_unix_epoch.subsec_millis()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::duration_subsec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/types_conv_map/parsing.rs:24:1 [INFO] [stderr] | [INFO] [stderr] 24 | / pub(in types_conv_map) fn parse_types_conv_map<'a>( [INFO] [stderr] 25 | | sess: &'a ParseSess, [INFO] [stderr] 26 | | name: &str, [INFO] [stderr] 27 | | code: &str, [INFO] [stderr] ... | [INFO] [stderr] 375 | | }) [INFO] [stderr] 376 | | } [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/types_conv_map/utils.rs:118:27 [INFO] [stderr] | [INFO] [stderr] 118 | span: self_type.span.clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.span` [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: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/types_conv_map/mod.rs:233:5 [INFO] [stderr] | [INFO] [stderr] 233 | / pub(crate) fn map_through_conversation_to_foreign( [INFO] [stderr] 234 | | &mut self, [INFO] [stderr] 235 | | rust_ty: &ast::Ty, [INFO] [stderr] 236 | | direction: petgraph::Direction, [INFO] [stderr] ... | [INFO] [stderr] 378 | | ret [INFO] [stderr] 379 | | } [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:164:21 [INFO] [stderr] | [INFO] [stderr] 164 | fn is_read_only(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:238:14 [INFO] [stderr] | [INFO] [stderr] 238 | .unwrap_or(Symbol::intern("")) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| Symbol::intern(""))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/lib.rs:584:13 [INFO] [stderr] | [INFO] [stderr] 584 | Err(_) => { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 28.45s [INFO] running `"docker" "inspect" "bd45a9c62048bc5a60ae8cabc657b4529485acd5f2804ce2f5bc7676d23d101d"` [INFO] running `"docker" "rm" "-f" "bd45a9c62048bc5a60ae8cabc657b4529485acd5f2804ce2f5bc7676d23d101d"` [INFO] [stdout] bd45a9c62048bc5a60ae8cabc657b4529485acd5f2804ce2f5bc7676d23d101d