[INFO] fetching crate edlc_core 0.1.1... [INFO] linting edlc_core-0.1.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate edlc_core 0.1.1 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate edlc_core 0.1.1 [INFO] finished tweaking crates.io crate edlc_core 0.1.1 [INFO] tweaked toml for crates.io crate edlc_core 0.1.1 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate edlc_core 0.1.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate edlc_core 0.1.1 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded matrixmultiply v0.3.9 [INFO] [stderr] Downloaded hermit-abi v0.5.0 [INFO] [stderr] Downloaded colored v1.9.4 [INFO] [stderr] Downloaded mint v0.5.9 [INFO] [stderr] Downloaded cust_core v0.1.1 [INFO] [stderr] Downloaded cust_raw v0.11.3 [INFO] [stderr] Downloaded cust_derive v0.2.0 [INFO] [stderr] Downloaded edlc_analysis v0.1.1 [INFO] [stderr] Downloaded wide v0.7.32 [INFO] [stderr] Downloaded anyhow v1.0.99 [INFO] [stderr] Downloaded clap v4.5.44 [INFO] [stderr] Downloaded vek v0.15.10 [INFO] [stderr] Downloaded cust v0.3.2 [INFO] [stderr] Downloaded libm v0.2.13 [INFO] [stderr] Downloaded fern v0.6.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f8e5d93c6bb6b418bd4da6a506e6a4742e152ace6bd1d906efea61a5b90d92ea [INFO] running `Command { std: "docker" "start" "-a" "f8e5d93c6bb6b418bd4da6a506e6a4742e152ace6bd1d906efea61a5b90d92ea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f8e5d93c6bb6b418bd4da6a506e6a4742e152ace6bd1d906efea61a5b90d92ea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f8e5d93c6bb6b418bd4da6a506e6a4742e152ace6bd1d906efea61a5b90d92ea", kill_on_drop: false }` [INFO] [stdout] f8e5d93c6bb6b418bd4da6a506e6a4742e152ace6bd1d906efea61a5b90d92ea [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 47cfc8861a57b3b024136543d66de48478e1a82df51f46063908582784de89de [INFO] running `Command { std: "docker" "start" "-a" "47cfc8861a57b3b024136543d66de48478e1a82df51f46063908582784de89de", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling anyhow v1.0.99 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking ansi_term v0.12.1 [INFO] [stderr] Checking edlc_analysis v0.1.1 [INFO] [stderr] Checking humantime v2.2.0 [INFO] [stderr] Checking clap_builder v4.5.44 [INFO] [stderr] Checking colored v1.9.4 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking fern v0.6.2 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling clap_derive v4.5.41 [INFO] [stderr] Checking clap v4.5.44 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking edlc_core v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/mir/mir_type/layout.rs:627:27 [INFO] [stdout] | [INFO] [stdout] 627 | variants.push((UnionVariant { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 628 | | elements: vec![variant_layout], [INFO] [stdout] 629 | | })); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] help: remove them [INFO] [stdout] | [INFO] [stdout] 627 ~ variants.push(UnionVariant { [INFO] [stdout] 628 + elements: vec![variant_layout], [INFO] [stdout] 629 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/mir/mir_funcs.rs:721:5 [INFO] [stdout] | [INFO] [stdout] 721 | / /// that the call must be executed again at a later stage. [INFO] [stdout] ... | [INFO] [stdout] 753 | | [INFO] [stdout] | |_^ [INFO] [stdout] 754 | pub fn alloc_func(&mut self) -> FnId { [INFO] [stdout] | ----------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document function `alloc_func` then comment it out [INFO] [stdout] | [INFO] [stdout] 714 ~ // /// Returns the dependencies of one function to other functions. [INFO] [stdout] 715 ~ // /// [INFO] [stdout] 716 ~ // /// # Unresolved Functions [INFO] [stdout] 717 ~ // /// [INFO] [stdout] 718 ~ // /// Due to the staged nature of the compiler, it is not always possible to determine all [INFO] [stdout] 719 ~ // /// dependencies during the generation phase of a function body. [INFO] [stdout] 720 ~ // /// When this happens, this function returns [Ok(FunctionDependencies::Waiting)], indicating [INFO] [stdout] 721 ~ // /// that the call must be executed again at a later stage. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/issue.rs:385:16 [INFO] [stdout] | [INFO] [stdout] 385 | if msg.len() + 1 <= col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `msg.len() < col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/issue.rs:430:16 [INFO] [stdout] | [INFO] [stdout] 430 | if msg.len() + 1 <= col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `msg.len() < col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EdlFnRet` [INFO] [stdout] --> src/resolver.rs:1683:31 [INFO] [stdout] | [INFO] [stdout] 1683 | use crate::core::edl_fn::{EdlFnRet, EdlFnSignature}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EdlMaybeType` [INFO] [stdout] --> src/resolver.rs:1685:33 [INFO] [stdout] | [INFO] [stdout] 1685 | use crate::core::edl_type::{EdlMaybeType, EdlTypeRegistry}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdlFnArgument` and `EdlFnRet` [INFO] [stdout] --> src/ast/test.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | use crate::core::edl_fn::{EdlFnArgument, EdlFnParam, EdlFnRet, EdlFnSignature}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EdlMaybeType` [INFO] [stdout] --> src/ast/test.rs:29:29 [INFO] [stdout] | [INFO] [stdout] 29 | use crate::core::edl_type::{EdlMaybeType, EdlTypeRegistry}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/mir/mir_type/layout.rs:627:27 [INFO] [stdout] | [INFO] [stdout] 627 | variants.push((UnionVariant { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 628 | | elements: vec![variant_layout], [INFO] [stdout] 629 | | })); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] help: remove them [INFO] [stdout] | [INFO] [stdout] 627 ~ variants.push(UnionVariant { [INFO] [stdout] 628 + elements: vec![variant_layout], [INFO] [stdout] 629 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/mir/mir_funcs.rs:721:5 [INFO] [stdout] | [INFO] [stdout] 721 | / /// that the call must be executed again at a later stage. [INFO] [stdout] ... | [INFO] [stdout] 753 | | [INFO] [stdout] | |_^ [INFO] [stdout] 754 | pub fn alloc_func(&mut self) -> FnId { [INFO] [stdout] | ----------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document function `alloc_func` then comment it out [INFO] [stdout] | [INFO] [stdout] 714 ~ // /// Returns the dependencies of one function to other functions. [INFO] [stdout] 715 ~ // /// [INFO] [stdout] 716 ~ // /// # Unresolved Functions [INFO] [stdout] 717 ~ // /// [INFO] [stdout] 718 ~ // /// Due to the staged nature of the compiler, it is not always possible to determine all [INFO] [stdout] 719 ~ // /// dependencies during the generation phase of a function body. [INFO] [stdout] 720 ~ // /// When this happens, this function returns [Ok(FunctionDependencies::Waiting)], indicating [INFO] [stdout] 721 ~ // /// that the call must be executed again at a later stage. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/issue.rs:385:16 [INFO] [stdout] | [INFO] [stdout] 385 | if msg.len() + 1 <= col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `msg.len() < col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/issue.rs:430:16 [INFO] [stdout] | [INFO] [stdout] 430 | if msg.len() + 1 <= col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `msg.len() < col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ast/test.rs:399:9 [INFO] [stdout] | [INFO] [stdout] 399 | let mut target_ty = hir_phase.types.usize(); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `snapshot` [INFO] [stdout] --> src/core/type_analysis/snapshot_vec.rs:461:13 [INFO] [stdout] | [INFO] [stdout] 461 | let snapshot = vec.dump(lvl2); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_snapshot` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lvl2` [INFO] [stdout] --> src/core/type_analysis/snapshot_vec.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | let lvl2 = vec.snapshot(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_lvl2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `snap` [INFO] [stdout] --> src/core/type_analysis/snapshot_vec.rs:519:17 [INFO] [stdout] | [INFO] [stdout] 519 | let snap = vec.snapshot(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_snap` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `snap` [INFO] [stdout] --> src/core/type_analysis/snapshot_vec.rs:547:17 [INFO] [stdout] | [INFO] [stdout] 547 | let snap = vec.snapshot(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_snap` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lvl2` [INFO] [stdout] --> src/core/type_analysis/snapshot_vec.rs:606:13 [INFO] [stdout] | [INFO] [stdout] 606 | let lvl2 = vec.snapshot(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_lvl2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/core/type_analysis.rs:2040:13 [INFO] [stdout] | [INFO] [stdout] 2040 | let mut reg = EdlTypeRegistry::default(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/core/type_analysis.rs:2055:13 [INFO] [stdout] | [INFO] [stdout] 2055 | let s2 = inferer.snapshot(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/core/type_analysis.rs:2105:13 [INFO] [stdout] | [INFO] [stdout] 2105 | let mut reg = EdlTypeRegistry::default(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/lexer.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | / impl PartialOrd for SrcPos { [INFO] [stdout] 88 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 89 | | match self.line.cmp(&other.line) { [INFO] [stdout] 90 | | Ordering::Less => { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 89 - match self.line.cmp(&other.line) { [INFO] [stdout] 90 - Ordering::Less => { [INFO] [stdout] 91 - Some(Ordering::Less) [INFO] [stdout] 92 - } [INFO] [stdout] 93 - Ordering::Equal => { [INFO] [stdout] 94 - match self.col.cmp(&other.col) { [INFO] [stdout] 95 - Ordering::Less => Some(Ordering::Less), [INFO] [stdout] 96 - Ordering::Equal => Some(Ordering::Equal), [INFO] [stdout] 97 - Ordering::Greater => Some(Ordering::Greater), [INFO] [stdout] 98 - } [INFO] [stdout] 99 - } [INFO] [stdout] 100 - Ordering::Greater => Some(Ordering::Greater), [INFO] [stdout] 101 - } [INFO] [stdout] 102 - } [INFO] [stdout] 88 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:2011:13 [INFO] [stdout] | [INFO] [stdout] 2011 | let id = compiler.parse_module(inline_code!(r#" [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:2021:13 [INFO] [stdout] | [INFO] [stdout] 2021 | let id = compiler.parse_module(inline_code!(r#" [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:2032:13 [INFO] [stdout] | [INFO] [stdout] 2032 | let id = compiler.parse_module(inline_code!(r#" [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:673:9 [INFO] [stdout] | [INFO] [stdout] 673 | /// mind, but it should be unique, such that each token can be identified with exactly one [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:674:9 [INFO] [stdout] | [INFO] [stdout] 674 | /// source. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:675:9 [INFO] [stdout] | [INFO] [stdout] 675 | /// It should be noted at this point that the source marker `anonymous` is reserved for [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:676:9 [INFO] [stdout] | [INFO] [stdout] 676 | /// lexers that are created from no specific source in particular. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:677:9 [INFO] [stdout] | [INFO] [stdout] 677 | /// Therefore, it cannot be used as an argument to this function. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parser.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / match other { [INFO] [stdout] 62 | | ParseError::UnknownModuleScope => true, [INFO] [stdout] 63 | | _ => false, [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 61 - match other { [INFO] [stdout] 62 - ParseError::UnknownModuleScope => true, [INFO] [stdout] 63 - _ => false, [INFO] [stdout] 64 - } [INFO] [stdout] 61 + matches!(other, ParseError::UnknownModuleScope) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `after_comma` after checking its variant with `is_some` [INFO] [stdout] --> src/ast/ast_expression/method_expr.rs:65:83 [INFO] [stdout] | [INFO] [stdout] 63 | if after_comma.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = after_comma` [INFO] [stdout] 64 | return Err(ParseError::WrongIndexFieldFormat( [INFO] [stdout] 65 | pos, format!("index contains floating-point fraction `{:?}`", after_comma.unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `type_hint` after checking its variant with `is_some` [INFO] [stdout] --> src/ast/ast_expression/method_expr.rs:73:67 [INFO] [stdout] | [INFO] [stdout] 71 | if type_hint.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = type_hint` [INFO] [stdout] 72 | return Err(ParseError::WrongIndexFieldFormat( [INFO] [stdout] 73 | pos, format!("index contains type hint `{}`", type_hint.unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/ast/ast_expression/if_expr.rs:226:46 [INFO] [stdout] | [INFO] [stdout] 226 | + else_block.as_ref().map(|_| 1).or(Some(0)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `hir::hir_expr::HirExpression` [INFO] [stdout] --> src/ast/ast_expression/type_init_expr.rs:380:84 [INFO] [stdout] | [INFO] [stdout] 380 | ... .map(|m| m.clone().hir_repr(parser).map(|item| item.into())) [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `hir::hir_expr::HirExpression` [INFO] [stdout] --> src/ast/ast_expression/type_init_expr.rs:583:84 [INFO] [stdout] | [INFO] [stdout] 583 | ... .map(|m| m.clone().hir_repr(parser).map(|item| item.into())) [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_expression.rs:319:42 [INFO] [stdout] | [INFO] [stdout] 319 | ... .map_err(|err| ParseError::LexError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParseError::LexError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_expression.rs:341:42 [INFO] [stdout] | [INFO] [stdout] 341 | ... .map_err(|err| ParseError::LexError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParseError::LexError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/ast/ast_module.rs:55:54 [INFO] [stdout] | [INFO] [stdout] 55 | self.doc.as_ref().map(|doc| doc.doc.clone()).unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/ast/ast_param_env.rs:78:53 [INFO] [stdout] | [INFO] [stdout] 78 | if self.src == "<>" && other.src.is_empty() { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 79 | | return true; [INFO] [stdout] 80 | | } else if self.src.is_empty() && other.src == "<>" { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/ast/ast_param_env.rs:80:60 [INFO] [stdout] | [INFO] [stdout] 80 | } else if self.src.is_empty() && other.src == "<>" { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 81 | | return true; [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_type_def/alias_def.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | AstType::parse(parser).map(|ty| AliasDef(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `AliasDef` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/ast/ast_type_def.rs:473:13 [INFO] [stdout] | [INFO] [stdout] 473 | / loop { [INFO] [stdout] 474 | | let Some(next) = dependencies.get(current) else { [INFO] [stdout] 475 | | break; [INFO] [stdout] 476 | | }; [INFO] [stdout] ... | [INFO] [stdout] 511 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(next) = dependencies.get(current) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/ast/ast_type_def.rs:525:13 [INFO] [stdout] | [INFO] [stdout] 525 | options.can_init = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `ast::ast_type_def::LayoutOptions { can_init: true, repr: EdlRepresentation::Edl }` and removing relevant reassignments [INFO] [stdout] --> src/ast/ast_type_def.rs:524:13 [INFO] [stdout] | [INFO] [stdout] 524 | let mut options = LayoutOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ast.rs:434:53 [INFO] [stdout] | [INFO] [stdout] 434 | let mut parser = supplier.create_parser(&src_code, src.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ast.rs:458:41 [INFO] [stdout] | [INFO] [stdout] 458 | &mut supplier.create_parser(&src_code, src.clone()), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/core/edl_param_env.rs:52:1 [INFO] [stdout] | [INFO] [stdout] 52 | / impl Default for EdlParameterEnv { [INFO] [stdout] 53 | | fn default() -> Self { [INFO] [stdout] 54 | | EdlParameterEnv { [INFO] [stdout] 55 | | params: vec![], [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 48 + #[derive(Default)] [INFO] [stdout] 49 | pub struct EdlParameterEnv { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/core/edl_param_env.rs:1193:9 [INFO] [stdout] | [INFO] [stdout] 1193 | / for def in self.stack.iter() { [INFO] [stdout] 1194 | | if def.env_id == env { [INFO] [stdout] 1195 | | return Some(def); [INFO] [stdout] ... | [INFO] [stdout] 1198 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.stack.iter().find(|&def| def.env_id == env).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/core/edl_param_env.rs:1213:9 [INFO] [stdout] | [INFO] [stdout] 1213 | / for def in self.stack.iter_mut() { [INFO] [stdout] 1214 | | if def.env_id == env { [INFO] [stdout] 1215 | | return Some(def); [INFO] [stdout] ... | [INFO] [stdout] 1218 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.stack.iter_mut().find(|def| def.env_id == env).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_value.rs:217:61 [INFO] [stdout] | [INFO] [stdout] 217 | EdlGenericParamVariant::Const(ty) => Ok(ty.clone()), [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_value.rs:222:20 [INFO] [stdout] | [INFO] [stdout] 222 | Ok(lit.type_id().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*lit.type_id()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IndexMap` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/core/index_map.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_impl.rs:156:19 [INFO] [stdout] | [INFO] [stdout] 156 | func: self.id.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn find_constraint Result>( [INFO] [stdout] 190 | | &self, [INFO] [stdout] 191 | | name: &str, [INFO] [stdout] 192 | | args: &FnArgumentConstraints, [INFO] [stdout] ... | [INFO] [stdout] 197 | | node: NodeId, [INFO] [stdout] 198 | | ) -> Result { [INFO] [stdout] | |__________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:218:107 [INFO] [stdout] | [INFO] [stdout] 218 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snaps... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 218 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snapshot, fn_id); [INFO] [stdout] 218 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &stack), inferer, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:268:107 [INFO] [stdout] | [INFO] [stdout] 268 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snaps... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 268 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snapshot, fn_id); [INFO] [stdout] 268 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &stack), inferer, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:391:5 [INFO] [stdout] | [INFO] [stdout] 391 | / pub fn gather_constraint_candidates Result>( [INFO] [stdout] 392 | | &self, [INFO] [stdout] 393 | | name: &str, [INFO] [stdout] 394 | | base: &TypeUid, [INFO] [stdout] ... | [INFO] [stdout] 399 | | node: NodeId, [INFO] [stdout] 400 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:431:5 [INFO] [stdout] | [INFO] [stdout] 431 | / pub fn gather_trait_constraints Result>( [INFO] [stdout] 432 | | &self, [INFO] [stdout] 433 | | trait_id: &EdlTraitInstance, [INFO] [stdout] 434 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 439 | | node: NodeId, [INFO] [stdout] 440 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:468:53 [INFO] [stdout] | [INFO] [stdout] 468 | self.impl_functions.entry(name.clone()).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:483:53 [INFO] [stdout] | [INFO] [stdout] 483 | self.impl_functions.entry(name.clone()).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:485:57 [INFO] [stdout] | [INFO] [stdout] 485 | self.trait_functions.entry(trait_impl.trait_id).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:518:5 [INFO] [stdout] | [INFO] [stdout] 518 | / pub fn gather_constraints Result>( [INFO] [stdout] 519 | | &self, [INFO] [stdout] 520 | | name: &str, [INFO] [stdout] 521 | | base: &TypeUid, [INFO] [stdout] ... | [INFO] [stdout] 526 | | node: NodeId, [INFO] [stdout] 527 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet` [INFO] [stdout] --> src/core/edl_impl.rs:532:20 [INFO] [stdout] | [INFO] [stdout] 532 | candidates.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:543:5 [INFO] [stdout] | [INFO] [stdout] 543 | / pub fn gather_trait_constraints Result>( [INFO] [stdout] 544 | | &self, [INFO] [stdout] 545 | | trait_id: &EdlTraitInstance, [INFO] [stdout] 546 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 551 | | node: NodeId, [INFO] [stdout] 552 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:887:103 [INFO] [stdout] | [INFO] [stdout] 887 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &mut stack), ctx, snapshot, fn_... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 887 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &mut stack), ctx, snapshot, fn_id); [INFO] [stdout] 887 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &stack), ctx, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/core/edl_impl.rs:910:9 [INFO] [stdout] | [INFO] [stdout] 910 | / let Some(res) = self.res.as_ref() else { [INFO] [stdout] 911 | | return None; [INFO] [stdout] 912 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let res = self.res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/core/edl_impl.rs:924:20 [INFO] [stdout] | [INFO] [stdout] 924 | let base = if let Some(base) = res.base.as_ref() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 925 | | Some(infer.find_type(*base)) [INFO] [stdout] 926 | | } else { [INFO] [stdout] 927 | | None [INFO] [stdout] 928 | | }; [INFO] [stdout] | |_________^ help: try: `res.base.as_ref().map(|base| infer.find_type(*base))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/core/type_analysis/constraints.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | !(el.0 == ori && el.1 == replacement) && !(el.0 == replacement && el.1 == ori)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(el.0 == ori && el.1 == replacement || el.0 == replacement && el.1 == ori)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/core/type_analysis/constraints.rs:207:40 [INFO] [stdout] | [INFO] [stdout] 207 | let cfg_values = regions.iter().enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 207 ~ let cfg_values = regions.iter() [INFO] [stdout] 208 ~ .map(|_| cfg_gen.generate()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:70:46 [INFO] [stdout] | [INFO] [stdout] 70 | self.info.insert(id, NodeInfo { pos: pos.clone(), src: src.clone() }); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | self.info.insert(id, NodeInfo { pos: pos.clone(), src: src.clone() }); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InferState` [INFO] [stdout] --> src/core/type_analysis.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | / pub fn new() -> Self { [INFO] [stdout] 323 | | InferState { [INFO] [stdout] 324 | | stack: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 321 + impl Default for InferState { [INFO] [stdout] 322 + fn default() -> Self { [INFO] [stdout] 323 + Self::new() [INFO] [stdout] 324 + } [INFO] [stdout] 325 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:388:17 [INFO] [stdout] | [INFO] [stdout] 388 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:387:17 [INFO] [stdout] | [INFO] [stdout] 387 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:845:9 [INFO] [stdout] | [INFO] [stdout] 845 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:844:9 [INFO] [stdout] | [INFO] [stdout] 844 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:968:62 [INFO] [stdout] | [INFO] [stdout] 968 | for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 968 - for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics.into_iter()) { [INFO] [stdout] 968 + for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:973:58 [INFO] [stdout] | [INFO] [stdout] 973 | for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 973 - for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts.into_iter()) { [INFO] [stdout] 973 + for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:978:69 [INFO] [stdout] | [INFO] [stdout] 978 | for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 978 - for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions.into_iter()) { [INFO] [stdout] 978 + for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1069:13 [INFO] [stdout] | [INFO] [stdout] 1069 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1068:13 [INFO] [stdout] | [INFO] [stdout] 1068 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1165:13 [INFO] [stdout] | [INFO] [stdout] 1165 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1164:13 [INFO] [stdout] | [INFO] [stdout] 1164 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1170:13 [INFO] [stdout] | [INFO] [stdout] 1170 | ok.op = InferOp::None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::None, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1169:13 [INFO] [stdout] | [INFO] [stdout] 1169 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:1201:26 [INFO] [stdout] | [INFO] [stdout] 1201 | let rhs_ty = rhs_ty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*rhs_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:1211:26 [INFO] [stdout] | [INFO] [stdout] 1211 | let lhs_ty = lhs_ty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*lhs_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1287:35 [INFO] [stdout] | [INFO] [stdout] 1287 | self.state.find_type(uid, &self.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1421:65 [INFO] [stdout] | [INFO] [stdout] 1421 | let flat_index = GenericType::flat_index(index, env_id, &self.type_reg); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1432:66 [INFO] [stdout] | [INFO] [stdout] 1432 | let flat_index = GenericConst::flat_index(index, env_id, &self.type_reg); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1810:35 [INFO] [stdout] | [INFO] [stdout] 1810 | let rhs_ty = rhs.get_type(&self.ctx.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.ctx.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1833:35 [INFO] [stdout] | [INFO] [stdout] 1833 | let rhs_ty = rhs.get_type(&self.ctx.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.ctx.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/lexer.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | / impl PartialOrd for SrcPos { [INFO] [stdout] 88 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 89 | | match self.line.cmp(&other.line) { [INFO] [stdout] 90 | | Ordering::Less => { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 89 - match self.line.cmp(&other.line) { [INFO] [stdout] 90 - Ordering::Less => { [INFO] [stdout] 91 - Some(Ordering::Less) [INFO] [stdout] 92 - } [INFO] [stdout] 93 - Ordering::Equal => { [INFO] [stdout] 94 - match self.col.cmp(&other.col) { [INFO] [stdout] 95 - Ordering::Less => Some(Ordering::Less), [INFO] [stdout] 96 - Ordering::Equal => Some(Ordering::Equal), [INFO] [stdout] 97 - Ordering::Greater => Some(Ordering::Greater), [INFO] [stdout] 98 - } [INFO] [stdout] 99 - } [INFO] [stdout] 100 - Ordering::Greater => Some(Ordering::Greater), [INFO] [stdout] 101 - } [INFO] [stdout] 102 - } [INFO] [stdout] 88 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:192:40 [INFO] [stdout] | [INFO] [stdout] 192 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:218:30 [INFO] [stdout] | [INFO] [stdout] 218 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:507:45 [INFO] [stdout] | [INFO] [stdout] 507 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types) [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:673:9 [INFO] [stdout] | [INFO] [stdout] 673 | /// mind, but it should be unique, such that each token can be identified with exactly one [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:674:9 [INFO] [stdout] | [INFO] [stdout] 674 | /// source. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:675:9 [INFO] [stdout] | [INFO] [stdout] 675 | /// It should be noted at this point that the source marker `anonymous` is reserved for [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:676:9 [INFO] [stdout] | [INFO] [stdout] 676 | /// lexers that are created from no specific source in particular. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lexer.rs:677:9 [INFO] [stdout] | [INFO] [stdout] 677 | /// Therefore, it cannot be used as an argument to this function. [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parser.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / match other { [INFO] [stdout] 62 | | ParseError::UnknownModuleScope => true, [INFO] [stdout] 63 | | _ => false, [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 61 - match other { [INFO] [stdout] 62 - ParseError::UnknownModuleScope => true, [INFO] [stdout] 63 - _ => false, [INFO] [stdout] 64 - } [INFO] [stdout] 61 + matches!(other, ParseError::UnknownModuleScope) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | Err(_) => out.push_str("?"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push('?')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:321:29 [INFO] [stdout] | [INFO] [stdout] 321 | ... self.pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:409:29 [INFO] [stdout] | [INFO] [stdout] 409 | ... self.pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:1564:22 [INFO] [stdout] | [INFO] [stdout] 1564 | .map_err(|err| HirTranslationError::from(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HirTranslationError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:1967:34 [INFO] [stdout] | [INFO] [stdout] 1967 | ... pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_let.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / pub fn new( [INFO] [stdout] 220 | | pos: SrcPos, [INFO] [stdout] 221 | | scope: ScopeId, [INFO] [stdout] 222 | | src: ModuleSrc, [INFO] [stdout] ... | [INFO] [stdout] 227 | | global: bool, [INFO] [stdout] 228 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlAliasId` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:304:21 [INFO] [stdout] | [INFO] [stdout] 304 | let alias = alias.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `alias` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:319:18 [INFO] [stdout] | [INFO] [stdout] 319 | .map(|item| SegmentType::Type(item)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SegmentType::Type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:574:26 [INFO] [stdout] | [INFO] [stdout] 574 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:580:26 [INFO] [stdout] | [INFO] [stdout] 580 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:588:26 [INFO] [stdout] | [INFO] [stdout] 588 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:600:26 [INFO] [stdout] | [INFO] [stdout] 600 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/hir/hir_expr/hir_env.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / pub enum HirParamValue { [INFO] [stdout] 108 | | Const(HirExpression), [INFO] [stdout] | | -------------------- the largest variant contains at least 720 bytes [INFO] [stdout] 109 | | ElicitConst, [INFO] [stdout] 110 | | Type(HirType), [INFO] [stdout] | | ------------- the second-largest variant contains at least 64 bytes [INFO] [stdout] 111 | | ElicitType, [INFO] [stdout] 112 | | } [INFO] [stdout] | |_^ the entire enum is at least 720 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 108 - Const(HirExpression), [INFO] [stdout] 108 + Const(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `after_comma` after checking its variant with `is_some` [INFO] [stdout] --> src/ast/ast_expression/method_expr.rs:65:83 [INFO] [stdout] | [INFO] [stdout] 63 | if after_comma.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = after_comma` [INFO] [stdout] 64 | return Err(ParseError::WrongIndexFieldFormat( [INFO] [stdout] 65 | pos, format!("index contains floating-point fraction `{:?}`", after_comma.unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `type_hint` after checking its variant with `is_some` [INFO] [stdout] --> src/ast/ast_expression/method_expr.rs:73:67 [INFO] [stdout] | [INFO] [stdout] 71 | if type_hint.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = type_hint` [INFO] [stdout] 72 | return Err(ParseError::WrongIndexFieldFormat( [INFO] [stdout] 73 | pos, format!("index contains type hint `{}`", type_hint.unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/hir/hir_expr/hir_name.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | / match &self.info.as_ref().unwrap().name_src { [INFO] [stdout] 169 | | NameSource::Const(val) => { [INFO] [stdout] 170 | | inferer.at(node) [INFO] [stdout] 171 | | .eq(&const_uid, val) [INFO] [stdout] ... | [INFO] [stdout] 175 | | _ => (), [INFO] [stdout] 176 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 168 ~ if let NameSource::Const(val) = &self.info.as_ref().unwrap().name_src { [INFO] [stdout] 169 + inferer.at(node) [INFO] [stdout] 170 + .eq(&const_uid, val) [INFO] [stdout] 171 + .map_err(|err| HirError::new_infer(self.pos, err)) [INFO] [stdout] 172 + .unwrap(); [INFO] [stdout] 173 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/ast/ast_expression/if_expr.rs:226:46 [INFO] [stdout] | [INFO] [stdout] 226 | + else_block.as_ref().map(|_| 1).or(Some(0)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/hir/hir_expr/hir_if.rs:302:27 [INFO] [stdout] | [INFO] [stdout] 302 | Some(mem::transmute::<_, &'a mut HirBlock>(&mut self.src.if_else_blocks[old_idx].1)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<&mut hir::hir_expr::hir_block::HirBlock, &mut hir::hir_expr::hir_block::HirBlock>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `hir::hir_expr::HirExpression` [INFO] [stdout] --> src/ast/ast_expression/type_init_expr.rs:380:84 [INFO] [stdout] | [INFO] [stdout] 380 | ... .map(|m| m.clone().hir_repr(parser).map(|item| item.into())) [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `hir::hir_expr::HirExpression` [INFO] [stdout] --> src/ast/ast_expression/type_init_expr.rs:583:84 [INFO] [stdout] | [INFO] [stdout] 583 | ... .map(|m| m.clone().hir_repr(parser).map(|item| item.into())) [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_if.rs:757:41 [INFO] [stdout] | [INFO] [stdout] 757 | let ty = mir_phase.types.mir_id(&return_ty, &phase.types)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `return_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_expression.rs:319:42 [INFO] [stdout] | [INFO] [stdout] 319 | ... .map_err(|err| ParseError::LexError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParseError::LexError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_expression.rs:341:42 [INFO] [stdout] | [INFO] [stdout] 341 | ... .map_err(|err| ParseError::LexError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParseError::LexError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:266:26 [INFO] [stdout] | [INFO] [stdout] 266 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:280:26 [INFO] [stdout] | [INFO] [stdout] 280 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:294:26 [INFO] [stdout] | [INFO] [stdout] 294 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:308:26 [INFO] [stdout] | [INFO] [stdout] 308 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/ast/ast_module.rs:55:54 [INFO] [stdout] | [INFO] [stdout] 55 | self.doc.as_ref().map(|doc| doc.doc.clone()).unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:745:76 [INFO] [stdout] | [INFO] [stdout] 745 | members.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 745 - members.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 745 + members.constraint_list(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:769:77 [INFO] [stdout] | [INFO] [stdout] 769 | members.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 769 - members.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 769 + members.constraint_named(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:773:5 [INFO] [stdout] | [INFO] [stdout] 773 | / fn constraint_enum_list_params( [INFO] [stdout] 774 | | node: NodeId, [INFO] [stdout] 775 | | uid: TypeUid, [INFO] [stdout] 776 | | pos: SrcPos, [INFO] [stdout] ... | [INFO] [stdout] 781 | | params: &mut [HirExpression], [INFO] [stdout] 782 | | ) -> Result, HirError> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:796:76 [INFO] [stdout] | [INFO] [stdout] 796 | variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 796 - variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 796 + variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:800:5 [INFO] [stdout] | [INFO] [stdout] 800 | / fn constraint_enum_named_params( [INFO] [stdout] 801 | | node: NodeId, [INFO] [stdout] 802 | | uid: TypeUid, [INFO] [stdout] 803 | | pos: SrcPos, [INFO] [stdout] ... | [INFO] [stdout] 808 | | params: &mut [NamedParameter], [INFO] [stdout] 809 | | ) -> Result, HirError> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:823:77 [INFO] [stdout] | [INFO] [stdout] 823 | variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 823 - variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 823 + variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:986:53 [INFO] [stdout] | [INFO] [stdout] 986 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:1008:53 [INFO] [stdout] | [INFO] [stdout] 1008 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:1033:53 [INFO] [stdout] | [INFO] [stdout] 1033 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/hir/hir_expr.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | / pub enum HirExpression { [INFO] [stdout] 75 | | ArrayInit(HirArrayInit), [INFO] [stdout] 76 | | ArrayIndex(HirArrayIndex), [INFO] [stdout] 77 | | As(HirAs), [INFO] [stdout] 78 | | Block(HirBlock), [INFO] [stdout] 79 | | Call(HirFunctionCall), [INFO] [stdout] | | --------------------- the largest variant contains at least 720 bytes [INFO] [stdout] ... | [INFO] [stdout] 85 | | If(HirIf), [INFO] [stdout] | | --------- the second-largest variant contains at least 288 bytes [INFO] [stdout] ... | [INFO] [stdout] 90 | | TypeInit(HirTypeInit), [INFO] [stdout] 91 | | } [INFO] [stdout] | |_^ the entire enum is at least 720 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 79 - Call(HirFunctionCall), [INFO] [stdout] 79 + Call(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/ast/ast_param_env.rs:78:53 [INFO] [stdout] | [INFO] [stdout] 78 | if self.src == "<>" && other.src.is_empty() { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 79 | | return true; [INFO] [stdout] 80 | | } else if self.src.is_empty() && other.src == "<>" { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/ast/ast_param_env.rs:80:60 [INFO] [stdout] | [INFO] [stdout] 80 | } else if self.src.is_empty() && other.src == "<>" { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 81 | | return true; [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/hir.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | /// a. Type checking (is every type fully resolved and fits nicely with its neighbors?) [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/hir.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | /// b. Function checking (do all the resolved functions actually exist, are callable and fit all qualifiers?) [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/hir.rs:726:56 [INFO] [stdout] | [INFO] [stdout] 726 | fn register_names(&mut self, phase: &mut HirPhase, errors: &mut Vec) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_errors` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/hir.rs:733:47 [INFO] [stdout] | [INFO] [stdout] 733 | val.register_names(phase, errors); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ast/ast_type_def/alias_def.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | AstType::parse(parser).map(|ty| AliasDef(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `AliasDef` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/ast/ast_type_def.rs:473:13 [INFO] [stdout] | [INFO] [stdout] 473 | / loop { [INFO] [stdout] 474 | | let Some(next) = dependencies.get(current) else { [INFO] [stdout] 475 | | break; [INFO] [stdout] 476 | | }; [INFO] [stdout] ... | [INFO] [stdout] 511 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(next) = dependencies.get(current) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/ast/ast_type_def.rs:525:13 [INFO] [stdout] | [INFO] [stdout] 525 | options.can_init = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `ast::ast_type_def::LayoutOptions { can_init: true, repr: EdlRepresentation::Edl }` and removing relevant reassignments [INFO] [stdout] --> src/ast/ast_type_def.rs:524:13 [INFO] [stdout] | [INFO] [stdout] 524 | let mut options = LayoutOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ByteLayout` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/mir/mir_type/abi.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ast.rs:434:53 [INFO] [stdout] | [INFO] [stdout] 434 | let mut parser = supplier.create_parser(&src_code, src.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ast.rs:458:41 [INFO] [stdout] | [INFO] [stdout] 458 | &mut supplier.create_parser(&src_code, src.clone()), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mir/mir_type.rs:492:64 [INFO] [stdout] | [INFO] [stdout] 492 | .and_then(|variant| variant.elements.member_offset(&search_name.0, types) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `search_name.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir/mir_type.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1139 | self.types.get(id.0).map(|ty| &ty.rust_repr)?.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.types.get(id.0).map(|ty| &ty.rust_repr)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/core/edl_param_env.rs:52:1 [INFO] [stdout] | [INFO] [stdout] 52 | / impl Default for EdlParameterEnv { [INFO] [stdout] 53 | | fn default() -> Self { [INFO] [stdout] 54 | | EdlParameterEnv { [INFO] [stdout] 55 | | params: vec![], [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 48 + #[derive(Default)] [INFO] [stdout] 49 | pub struct EdlParameterEnv { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/core/edl_param_env.rs:1193:9 [INFO] [stdout] | [INFO] [stdout] 1193 | / for def in self.stack.iter() { [INFO] [stdout] 1194 | | if def.env_id == env { [INFO] [stdout] 1195 | | return Some(def); [INFO] [stdout] ... | [INFO] [stdout] 1198 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.stack.iter().find(|&def| def.env_id == env).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/core/edl_param_env.rs:1213:9 [INFO] [stdout] | [INFO] [stdout] 1213 | / for def in self.stack.iter_mut() { [INFO] [stdout] 1214 | | if def.env_id == env { [INFO] [stdout] 1215 | | return Some(def); [INFO] [stdout] ... | [INFO] [stdout] 1218 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.stack.iter_mut().find(|def| def.env_id == env).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_value.rs:217:61 [INFO] [stdout] | [INFO] [stdout] 217 | EdlGenericParamVariant::Const(ty) => Ok(ty.clone()), [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_value.rs:222:20 [INFO] [stdout] | [INFO] [stdout] 222 | Ok(lit.type_id().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*lit.type_id()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IndexMap` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/core/index_map.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/mir/mir_expr/mir_variable.rs:509:9 [INFO] [stdout] | [INFO] [stdout] 509 | / self.index = Box::new(MirCall::add_usize( [INFO] [stdout] 510 | | self.index.as_ref().clone(), [INFO] [stdout] 511 | | *off.index, [INFO] [stdout] 512 | | mir_phase, [INFO] [stdout] 513 | | funcs, [INFO] [stdout] 514 | | )?.into()); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 509 ~ *self.index = MirCall::add_usize( [INFO] [stdout] 510 + self.index.as_ref().clone(), [INFO] [stdout] 511 + *off.index, [INFO] [stdout] 512 + mir_phase, [INFO] [stdout] 513 + funcs, [INFO] [stdout] 514 ~ )?.into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlTypeId` which implements the `Copy` trait [INFO] [stdout] --> src/core/edl_impl.rs:156:19 [INFO] [stdout] | [INFO] [stdout] 156 | func: self.id.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn find_constraint Result>( [INFO] [stdout] 190 | | &self, [INFO] [stdout] 191 | | name: &str, [INFO] [stdout] 192 | | args: &FnArgumentConstraints, [INFO] [stdout] ... | [INFO] [stdout] 197 | | node: NodeId, [INFO] [stdout] 198 | | ) -> Result { [INFO] [stdout] | |__________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:218:107 [INFO] [stdout] | [INFO] [stdout] 218 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snaps... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 218 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snapshot, fn_id); [INFO] [stdout] 218 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &stack), inferer, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:268:107 [INFO] [stdout] | [INFO] [stdout] 268 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snaps... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 268 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &mut stack), inferer, snapshot, fn_id); [INFO] [stdout] 268 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut inferer, &stack), inferer, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:391:5 [INFO] [stdout] | [INFO] [stdout] 391 | / pub fn gather_constraint_candidates Result>( [INFO] [stdout] 392 | | &self, [INFO] [stdout] 393 | | name: &str, [INFO] [stdout] 394 | | base: &TypeUid, [INFO] [stdout] ... | [INFO] [stdout] 399 | | node: NodeId, [INFO] [stdout] 400 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:431:5 [INFO] [stdout] | [INFO] [stdout] 431 | / pub fn gather_trait_constraints Result>( [INFO] [stdout] 432 | | &self, [INFO] [stdout] 433 | | trait_id: &EdlTraitInstance, [INFO] [stdout] 434 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 439 | | node: NodeId, [INFO] [stdout] 440 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:468:53 [INFO] [stdout] | [INFO] [stdout] 468 | self.impl_functions.entry(name.clone()).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:483:53 [INFO] [stdout] | [INFO] [stdout] 483 | self.impl_functions.entry(name.clone()).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/core/edl_impl.rs:485:57 [INFO] [stdout] | [INFO] [stdout] 485 | self.trait_functions.entry(trait_impl.trait_id).or_insert(HashSet::new()).insert(module); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:518:5 [INFO] [stdout] | [INFO] [stdout] 518 | / pub fn gather_constraints Result>( [INFO] [stdout] 519 | | &self, [INFO] [stdout] 520 | | name: &str, [INFO] [stdout] 521 | | base: &TypeUid, [INFO] [stdout] ... | [INFO] [stdout] 526 | | node: NodeId, [INFO] [stdout] 527 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet` [INFO] [stdout] --> src/core/edl_impl.rs:532:20 [INFO] [stdout] | [INFO] [stdout] 532 | candidates.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/core/edl_impl.rs:543:5 [INFO] [stdout] | [INFO] [stdout] 543 | / pub fn gather_trait_constraints Result>( [INFO] [stdout] 544 | | &self, [INFO] [stdout] 545 | | trait_id: &EdlTraitInstance, [INFO] [stdout] 546 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 551 | | node: NodeId, [INFO] [stdout] 552 | | ) -> (Vec, Vec) { [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `SigConstraint::from_signature` doesn't need a mutable reference [INFO] [stdout] --> src/core/edl_impl.rs:887:103 [INFO] [stdout] | [INFO] [stdout] 887 | ... let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &mut stack), ctx, snapshot, fn_... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 887 - let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &mut stack), ctx, snapshot, fn_id); [INFO] [stdout] 887 + let sig_constraint = roll_back_err!(SigConstraint::from_signature(node, fn_id, sig, &mut ctx, &stack), ctx, snapshot, fn_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/core/edl_impl.rs:910:9 [INFO] [stdout] | [INFO] [stdout] 910 | / let Some(res) = self.res.as_ref() else { [INFO] [stdout] 911 | | return None; [INFO] [stdout] 912 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let res = self.res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/core/edl_impl.rs:924:20 [INFO] [stdout] | [INFO] [stdout] 924 | let base = if let Some(base) = res.base.as_ref() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 925 | | Some(infer.find_type(*base)) [INFO] [stdout] 926 | | } else { [INFO] [stdout] 927 | | None [INFO] [stdout] 928 | | }; [INFO] [stdout] | |_________^ help: try: `res.base.as_ref().map(|base| infer.find_type(*base))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/mir/mir_vars.rs:352:28 [INFO] [stdout] | [INFO] [stdout] 352 | let tracked_vars = self.vars.keys().map(|k| *k).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.vars.keys().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/core/type_analysis/constraints.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | !(el.0 == ori && el.1 == replacement) && !(el.0 == replacement && el.1 == ori)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(el.0 == ori && el.1 == replacement || el.0 == replacement && el.1 == ori)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/core/type_analysis/constraints.rs:207:40 [INFO] [stdout] | [INFO] [stdout] 207 | let cfg_values = regions.iter().enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 207 ~ let cfg_values = regions.iter() [INFO] [stdout] 208 ~ .map(|_| cfg_gen.generate()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir.rs:310:24 [INFO] [stdout] | [INFO] [stdout] 310 | return item.comptime.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `item.comptime` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir.rs:319:24 [INFO] [stdout] | [INFO] [stdout] 319 | return item.maybe_comptime.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `item.maybe_comptime` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EdlCompiler` [INFO] [stdout] --> src/compiler.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / pub fn new() -> Self { [INFO] [stdout] 100 | | let name_resolver = TopLevelNameResolver::default(); [INFO] [stdout] 101 | | let type_registry = EdlTypeRegistry::default(); [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 97 + impl Default for EdlCompiler { [INFO] [stdout] 98 + fn default() -> Self { [INFO] [stdout] 99 + Self::new() [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:220:38 [INFO] [stdout] | [INFO] [stdout] 220 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:236:38 [INFO] [stdout] | [INFO] [stdout] 236 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:252:38 [INFO] [stdout] | [INFO] [stdout] 252 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:274:38 [INFO] [stdout] | [INFO] [stdout] 274 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:320:38 [INFO] [stdout] | [INFO] [stdout] 320 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:360:45 [INFO] [stdout] | [INFO] [stdout] 360 | let mut parser = self.create_parser(&src_code, src.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:378:38 [INFO] [stdout] | [INFO] [stdout] 378 | let mut parser = self.parser(&code, src.clone()); [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:70:46 [INFO] [stdout] | [INFO] [stdout] 70 | self.info.insert(id, NodeInfo { pos: pos.clone(), src: src.clone() }); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | self.info.insert(id, NodeInfo { pos: pos.clone(), src: src.clone() }); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:595:38 [INFO] [stdout] | [INFO] [stdout] 595 | let mut parser = self.parser(&env_str, env.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `env_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:609:38 [INFO] [stdout] | [INFO] [stdout] 609 | let mut parser = self.parser(&base_str, base.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `base_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InferState` [INFO] [stdout] --> src/core/type_analysis.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | / pub fn new() -> Self { [INFO] [stdout] 323 | | InferState { [INFO] [stdout] 324 | | stack: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 321 + impl Default for InferState { [INFO] [stdout] 322 + fn default() -> Self { [INFO] [stdout] 323 + Self::new() [INFO] [stdout] 324 + } [INFO] [stdout] 325 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:640:42 [INFO] [stdout] | [INFO] [stdout] 640 | let mut parser = self.parser(&func_str, func.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `func_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:388:17 [INFO] [stdout] | [INFO] [stdout] 388 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:387:17 [INFO] [stdout] | [INFO] [stdout] 387 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:688:42 [INFO] [stdout] | [INFO] [stdout] 688 | let mut parser = self.parser(&trait_str, trait_name.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `trait_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:704:42 [INFO] [stdout] | [INFO] [stdout] 704 | let mut parser = self.parser(&trait_param_str, trait_params.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `trait_param_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:738:38 [INFO] [stdout] | [INFO] [stdout] 738 | let mut parser = self.parser(&env_str, env.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `env_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:756:42 [INFO] [stdout] | [INFO] [stdout] 756 | let mut parser = self.parser(&func_str, func.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `func_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:845:9 [INFO] [stdout] | [INFO] [stdout] 845 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:844:9 [INFO] [stdout] | [INFO] [stdout] 844 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:968:62 [INFO] [stdout] | [INFO] [stdout] 968 | for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 968 - for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics.into_iter()) { [INFO] [stdout] 968 + for (lhs_ty, rhs_ty) in lhs_generics.into_iter().zip(rhs_generics) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:973:58 [INFO] [stdout] | [INFO] [stdout] 973 | for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 973 - for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts.into_iter()) { [INFO] [stdout] 973 + for (lhs_c, rhs_c) in lhs_consts.into_iter().zip(rhs_consts) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/core/type_analysis.rs:978:69 [INFO] [stdout] | [INFO] [stdout] 978 | for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions.into_iter()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 978 - for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions.into_iter()) { [INFO] [stdout] 978 + for (lhs_region, rhs_region) in lhs_regions.into_iter().zip(rhs_regions) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1069:13 [INFO] [stdout] | [INFO] [stdout] 1069 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1068:13 [INFO] [stdout] | [INFO] [stdout] 1068 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:1103:38 [INFO] [stdout] | [INFO] [stdout] 1103 | let mut parser = self.parser(¶m_str, func_params.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `param_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1165:13 [INFO] [stdout] | [INFO] [stdout] 1165 | ok.op = InferOp::Adhoc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::Adhoc, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1164:13 [INFO] [stdout] | [INFO] [stdout] 1164 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:1117:42 [INFO] [stdout] | [INFO] [stdout] 1117 | let mut parser = self.parser(&associated_type_src, associated_type.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `associated_type_src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/core/type_analysis.rs:1170:13 [INFO] [stdout] | [INFO] [stdout] 1170 | ok.op = InferOp::None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::type_analysis::InferOk { op: InferOp::None, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/core/type_analysis.rs:1169:13 [INFO] [stdout] | [INFO] [stdout] 1169 | let mut ok = InferOk::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:1201:26 [INFO] [stdout] | [INFO] [stdout] 1201 | let rhs_ty = rhs_ty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*rhs_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/core/type_analysis.rs:1211:26 [INFO] [stdout] | [INFO] [stdout] 1211 | let lhs_ty = lhs_ty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*lhs_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1287:35 [INFO] [stdout] | [INFO] [stdout] 1287 | self.state.find_type(uid, &self.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1421:65 [INFO] [stdout] | [INFO] [stdout] 1421 | let flat_index = GenericType::flat_index(index, env_id, &self.type_reg); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1432:66 [INFO] [stdout] | [INFO] [stdout] 1432 | let flat_index = GenericConst::flat_index(index, env_id, &self.type_reg); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/file.rs:53:82 [INFO] [stdout] | [INFO] [stdout] 53 | write!(f, "BufferedFile {}, buffer size: {} bytes", self.path.display(), self.buffer.as_bytes().len()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.buffer.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1810:35 [INFO] [stdout] | [INFO] [stdout] 1810 | let rhs_ty = rhs.get_type(&self.ctx.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.ctx.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/type_analysis.rs:1833:35 [INFO] [stdout] | [INFO] [stdout] 1833 | let rhs_ty = rhs.get_type(&self.ctx.type_reg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.ctx.type_reg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | errors: errors.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/issue.rs:220:22 [INFO] [stdout] | [INFO] [stdout] 220 | pub fn to_string(&self, types: &EdlTypeRegistry, vars: &EdlVarRegistry) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:251:35 [INFO] [stdout] | [INFO] [stdout] 251 | for err in errors.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:276:35 [INFO] [stdout] | [INFO] [stdout] 276 | for err in errors.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `print!` args [INFO] [stdout] --> src/issue.rs:376:105 [INFO] [stdout] | [INFO] [stdout] 376 | .paint(format!("{}:{}:{}", file.format_location(), pos.line + offset.0, pos.col + offset.1)).to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 395 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:414:29 [INFO] [stdout] | [INFO] [stdout] 414 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:437:29 [INFO] [stdout] | [INFO] [stdout] 437 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:455:29 [INFO] [stdout] | [INFO] [stdout] 455 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:192:40 [INFO] [stdout] | [INFO] [stdout] 192 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:218:30 [INFO] [stdout] | [INFO] [stdout] 218 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | ... first: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_array_init.rs:507:45 [INFO] [stdout] | [INFO] [stdout] 507 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types) [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/documentation.rs:409:44 [INFO] [stdout] | [INFO] [stdout] 409 | fn doc(&self, phase: &mut HirPhase) -> Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 648 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `hir::HirPhase`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | Err(_) => out.push_str("?"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push('?')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:321:29 [INFO] [stdout] | [INFO] [stdout] 321 | ... self.pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:409:29 [INFO] [stdout] | [INFO] [stdout] 409 | ... self.pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:1564:22 [INFO] [stdout] | [INFO] [stdout] 1564 | .map_err(|err| HirTranslationError::from(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HirTranslationError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_call.rs:1967:34 [INFO] [stdout] | [INFO] [stdout] 1967 | ... pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_let.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / pub fn new( [INFO] [stdout] 220 | | pos: SrcPos, [INFO] [stdout] 221 | | scope: ScopeId, [INFO] [stdout] 222 | | src: ModuleSrc, [INFO] [stdout] ... | [INFO] [stdout] 227 | | global: bool, [INFO] [stdout] 228 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `EdlAliasId` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:304:21 [INFO] [stdout] | [INFO] [stdout] 304 | let alias = alias.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `alias` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:319:18 [INFO] [stdout] | [INFO] [stdout] 319 | .map(|item| SegmentType::Type(item)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SegmentType::Type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:574:26 [INFO] [stdout] | [INFO] [stdout] 574 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:580:26 [INFO] [stdout] | [INFO] [stdout] 580 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:588:26 [INFO] [stdout] | [INFO] [stdout] 588 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/hir/hir_expr/hir_type.rs:600:26 [INFO] [stdout] | [INFO] [stdout] 600 | .map(|ty| EdlMaybeType::Fixed(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `EdlMaybeType::Fixed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/hir/hir_expr/hir_env.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / pub enum HirParamValue { [INFO] [stdout] 108 | | Const(HirExpression), [INFO] [stdout] | | -------------------- the largest variant contains at least 720 bytes [INFO] [stdout] 109 | | ElicitConst, [INFO] [stdout] 110 | | Type(HirType), [INFO] [stdout] | | ------------- the second-largest variant contains at least 64 bytes [INFO] [stdout] 111 | | ElicitType, [INFO] [stdout] 112 | | } [INFO] [stdout] | |_^ the entire enum is at least 720 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 108 - Const(HirExpression), [INFO] [stdout] 108 + Const(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/hir/hir_expr/hir_name.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | / match &self.info.as_ref().unwrap().name_src { [INFO] [stdout] 169 | | NameSource::Const(val) => { [INFO] [stdout] 170 | | inferer.at(node) [INFO] [stdout] 171 | | .eq(&const_uid, val) [INFO] [stdout] ... | [INFO] [stdout] 175 | | _ => (), [INFO] [stdout] 176 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 168 ~ if let NameSource::Const(val) = &self.info.as_ref().unwrap().name_src { [INFO] [stdout] 169 + inferer.at(node) [INFO] [stdout] 170 + .eq(&const_uid, val) [INFO] [stdout] 171 + .map_err(|err| HirError::new_infer(self.pos, err)) [INFO] [stdout] 172 + .unwrap(); [INFO] [stdout] 173 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/hir/hir_expr/hir_if.rs:302:27 [INFO] [stdout] | [INFO] [stdout] 302 | Some(mem::transmute::<_, &'a mut HirBlock>(&mut self.src.if_else_blocks[old_idx].1)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<&mut hir::hir_expr::hir_block::HirBlock, &mut hir::hir_expr::hir_block::HirBlock>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_if.rs:757:41 [INFO] [stdout] | [INFO] [stdout] 757 | let ty = mir_phase.types.mir_id(&return_ty, &phase.types)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `return_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:266:26 [INFO] [stdout] | [INFO] [stdout] 266 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:280:26 [INFO] [stdout] | [INFO] [stdout] 280 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:294:26 [INFO] [stdout] | [INFO] [stdout] 294 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SrcPos` which implements the `Copy` trait [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:308:26 [INFO] [stdout] | [INFO] [stdout] 308 | pos: self.pos.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:745:76 [INFO] [stdout] | [INFO] [stdout] 745 | members.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 745 - members.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 745 + members.constraint_list(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:769:77 [INFO] [stdout] | [INFO] [stdout] 769 | members.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 769 - members.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 769 + members.constraint_named(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:773:5 [INFO] [stdout] | [INFO] [stdout] 773 | / fn constraint_enum_list_params( [INFO] [stdout] 774 | | node: NodeId, [INFO] [stdout] 775 | | uid: TypeUid, [INFO] [stdout] 776 | | pos: SrcPos, [INFO] [stdout] ... | [INFO] [stdout] 781 | | params: &mut [HirExpression], [INFO] [stdout] 782 | | ) -> Result, HirError> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:796:76 [INFO] [stdout] | [INFO] [stdout] 796 | variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 796 - variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 796 + variant.constraint_list(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:800:5 [INFO] [stdout] | [INFO] [stdout] 800 | / fn constraint_enum_named_params( [INFO] [stdout] 801 | | node: NodeId, [INFO] [stdout] 802 | | uid: TypeUid, [INFO] [stdout] 803 | | pos: SrcPos, [INFO] [stdout] ... | [INFO] [stdout] 808 | | params: &mut [NamedParameter], [INFO] [stdout] 809 | | ) -> Result, HirError> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `at_env` doesn't need a mutable reference [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:823:77 [INFO] [stdout] | [INFO] [stdout] 823 | variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 823 - variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &mut stack)) [INFO] [stdout] 823 + variant.constraint_named(types.into_iter(), &mut infer.at_env(node, &stack)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:986:53 [INFO] [stdout] | [INFO] [stdout] 986 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:1008:53 [INFO] [stdout] | [INFO] [stdout] 1008 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hir/hir_expr/hir_type_init.rs:1033:53 [INFO] [stdout] | [INFO] [stdout] 1033 | let mir_ty = mir_phase.types.mir_id(&ty, &phase.types)?; [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/hir/hir_expr.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | / pub enum HirExpression { [INFO] [stdout] 75 | | ArrayInit(HirArrayInit), [INFO] [stdout] 76 | | ArrayIndex(HirArrayIndex), [INFO] [stdout] 77 | | As(HirAs), [INFO] [stdout] 78 | | Block(HirBlock), [INFO] [stdout] 79 | | Call(HirFunctionCall), [INFO] [stdout] | | --------------------- the largest variant contains at least 720 bytes [INFO] [stdout] ... | [INFO] [stdout] 85 | | If(HirIf), [INFO] [stdout] | | --------- the second-largest variant contains at least 288 bytes [INFO] [stdout] ... | [INFO] [stdout] 90 | | TypeInit(HirTypeInit), [INFO] [stdout] 91 | | } [INFO] [stdout] | |_^ the entire enum is at least 720 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 79 - Call(HirFunctionCall), [INFO] [stdout] 79 + Call(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/hir.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | /// a. Type checking (is every type fully resolved and fits nicely with its neighbors?) [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/hir.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | /// b. Function checking (do all the resolved functions actually exist, are callable and fit all qualifiers?) [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/hir.rs:726:56 [INFO] [stdout] | [INFO] [stdout] 726 | fn register_names(&mut self, phase: &mut HirPhase, errors: &mut Vec) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_errors` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/hir.rs:733:47 [INFO] [stdout] | [INFO] [stdout] 733 | val.register_names(phase, errors); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ByteLayout` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/mir/mir_type/abi.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mir/mir_type.rs:492:64 [INFO] [stdout] | [INFO] [stdout] 492 | .and_then(|variant| variant.elements.member_offset(&search_name.0, types) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `search_name.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir/mir_type.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1139 | self.types.get(id.0).map(|ty| &ty.rust_repr)?.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.types.get(id.0).map(|ty| &ty.rust_repr)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/mir/mir_expr/mir_variable.rs:509:9 [INFO] [stdout] | [INFO] [stdout] 509 | / self.index = Box::new(MirCall::add_usize( [INFO] [stdout] 510 | | self.index.as_ref().clone(), [INFO] [stdout] 511 | | *off.index, [INFO] [stdout] 512 | | mir_phase, [INFO] [stdout] 513 | | funcs, [INFO] [stdout] 514 | | )?.into()); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 509 ~ *self.index = MirCall::add_usize( [INFO] [stdout] 510 + self.index.as_ref().clone(), [INFO] [stdout] 511 + *off.index, [INFO] [stdout] 512 + mir_phase, [INFO] [stdout] 513 + funcs, [INFO] [stdout] 514 ~ )?.into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/mir/mir_vars.rs:352:28 [INFO] [stdout] | [INFO] [stdout] 352 | let tracked_vars = self.vars.keys().map(|k| *k).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.vars.keys().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir.rs:310:24 [INFO] [stdout] | [INFO] [stdout] 310 | return item.comptime.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `item.comptime` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/mir.rs:319:24 [INFO] [stdout] | [INFO] [stdout] 319 | return item.maybe_comptime.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `item.maybe_comptime` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EdlCompiler` [INFO] [stdout] --> src/compiler.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / pub fn new() -> Self { [INFO] [stdout] 100 | | let name_resolver = TopLevelNameResolver::default(); [INFO] [stdout] 101 | | let type_registry = EdlTypeRegistry::default(); [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 97 + impl Default for EdlCompiler { [INFO] [stdout] 98 + fn default() -> Self { [INFO] [stdout] 99 + Self::new() [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:220:38 [INFO] [stdout] | [INFO] [stdout] 220 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:236:38 [INFO] [stdout] | [INFO] [stdout] 236 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:252:38 [INFO] [stdout] | [INFO] [stdout] 252 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:274:38 [INFO] [stdout] | [INFO] [stdout] 274 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:320:38 [INFO] [stdout] | [INFO] [stdout] 320 | let mut parser = self.parser(&src, module_src.clone()); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:360:45 [INFO] [stdout] | [INFO] [stdout] 360 | let mut parser = self.create_parser(&src_code, src.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `src_code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:378:38 [INFO] [stdout] | [INFO] [stdout] 378 | let mut parser = self.parser(&code, src.clone()); [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:595:38 [INFO] [stdout] | [INFO] [stdout] 595 | let mut parser = self.parser(&env_str, env.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `env_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:609:38 [INFO] [stdout] | [INFO] [stdout] 609 | let mut parser = self.parser(&base_str, base.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `base_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:640:42 [INFO] [stdout] | [INFO] [stdout] 640 | let mut parser = self.parser(&func_str, func.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `func_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:688:42 [INFO] [stdout] | [INFO] [stdout] 688 | let mut parser = self.parser(&trait_str, trait_name.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `trait_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:704:42 [INFO] [stdout] | [INFO] [stdout] 704 | let mut parser = self.parser(&trait_param_str, trait_params.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `trait_param_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:738:38 [INFO] [stdout] | [INFO] [stdout] 738 | let mut parser = self.parser(&env_str, env.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `env_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:756:42 [INFO] [stdout] | [INFO] [stdout] 756 | let mut parser = self.parser(&func_str, func.clone()); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `func_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:1103:38 [INFO] [stdout] | [INFO] [stdout] 1103 | let mut parser = self.parser(¶m_str, func_params.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `param_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler.rs:1117:42 [INFO] [stdout] | [INFO] [stdout] 1117 | let mut parser = self.parser(&associated_type_src, associated_type.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `associated_type_src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/file.rs:53:82 [INFO] [stdout] | [INFO] [stdout] 53 | write!(f, "BufferedFile {}, buffer size: {} bytes", self.path.display(), self.buffer.as_bytes().len()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.buffer.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | errors: errors.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/issue.rs:220:22 [INFO] [stdout] | [INFO] [stdout] 220 | pub fn to_string(&self, types: &EdlTypeRegistry, vars: &EdlVarRegistry) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:251:35 [INFO] [stdout] | [INFO] [stdout] 251 | for err in errors.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/issue.rs:276:35 [INFO] [stdout] | [INFO] [stdout] 276 | for err in errors.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `print!` args [INFO] [stdout] --> src/issue.rs:376:105 [INFO] [stdout] | [INFO] [stdout] 376 | .paint(format!("{}:{}:{}", file.format_location(), pos.line + offset.0, pos.col + offset.1)).to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 395 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:414:29 [INFO] [stdout] | [INFO] [stdout] 414 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:437:29 [INFO] [stdout] | [INFO] [stdout] 437 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/issue.rs:455:29 [INFO] [stdout] | [INFO] [stdout] 455 | let s = format!("{}", Self::text_wrap(msg, 60, self.leading_spaces as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `Self::text_wrap(msg, 60, self.leading_spaces as u32).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/documentation.rs:409:44 [INFO] [stdout] | [INFO] [stdout] 409 | fn doc(&self, phase: &mut HirPhase) -> Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 648 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `hir::HirPhase`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 25.61s [INFO] running `Command { std: "docker" "inspect" "47cfc8861a57b3b024136543d66de48478e1a82df51f46063908582784de89de", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47cfc8861a57b3b024136543d66de48478e1a82df51f46063908582784de89de", kill_on_drop: false }` [INFO] [stdout] 47cfc8861a57b3b024136543d66de48478e1a82df51f46063908582784de89de