[INFO] cloning repository https://github.com/cyrus-lang/Cyrus-Lang [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cyrus-lang/Cyrus-Lang" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcyrus-lang%2FCyrus-Lang", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcyrus-lang%2FCyrus-Lang'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 455d95aae66e6642917734e201929dee3fd6444d [INFO] linting cyrus-lang/Cyrus-Lang against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcyrus-lang%2FCyrus-Lang" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cyrus-lang/Cyrus-Lang [INFO] finished tweaking git repo https://github.com/cyrus-lang/Cyrus-Lang [INFO] tweaked toml for git repo https://github.com/cyrus-lang/Cyrus-Lang written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cyrus-lang/Cyrus-Lang 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 git repo https://github.com/cyrus-lang/Cyrus-Lang 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 inkwell_internals v0.12.0 [INFO] [stderr] Downloaded colorized v1.0.0 [INFO] [stderr] Downloaded llvm-sys v181.3.0 [INFO] [stderr] Downloaded fx-hash v0.1.0 [INFO] [stderr] Downloaded inkwell v0.7.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 02b33adbe7a01f2af4009af58e9ac7149f502f201f64e1d4f0f2f4d6d8de9489 [INFO] running `Command { std: "docker" "start" "-a" "02b33adbe7a01f2af4009af58e9ac7149f502f201f64e1d4f0f2f4d6d8de9489", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "02b33adbe7a01f2af4009af58e9ac7149f502f201f64e1d4f0f2f4d6d8de9489", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "02b33adbe7a01f2af4009af58e9ac7149f502f201f64e1d4f0f2f4d6d8de9489", kill_on_drop: false }` [INFO] [stdout] 02b33adbe7a01f2af4009af58e9ac7149f502f201f64e1d4f0f2f4d6d8de9489 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] dd7e857a74703d3c74a2481ae19d1159ab682f4b4f8fbe43d7cf71a148262907 [INFO] running `Command { std: "docker" "start" "-a" "dd7e857a74703d3c74a2481ae19d1159ab682f4b4f8fbe43d7cf71a148262907", kill_on_drop: false }` [INFO] [stderr] Checking colorized v1.0.0 [INFO] [stderr] Checking cyrusc_tokens v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_tokens) [INFO] [stderr] Checking cyrusc_abi v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_abi) [INFO] [stderr] Checking fx-hash v0.1.0 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Compiling regex-lite v0.1.8 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Compiling blake3 v1.8.2 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling inkwell v0.7.1 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Compiling cyrusc_asan_wrapper v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_asan_wrapper) [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/cyrusc_asan_wrapper/build.rs:48:59 [INFO] [stdout] | [INFO] [stdout] 48 | println!("cargo:rustc-link-search=native={}", &token[2..]); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/cyrusc_asan_wrapper/build.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | if token.starts_with("-L") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some() = token.strip_prefix("-L") { [INFO] [stdout] 48 ~ println!("cargo:rustc-link-search=native={}", ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/cyrusc_asan_wrapper/build.rs:50:49 [INFO] [stdout] | [INFO] [stdout] 50 | println!("cargo:rustc-link-lib={}", &token[2..]); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/cyrusc_asan_wrapper/build.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | } else if token.starts_with("-l") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 49 ~ } else if let Some() = token.strip_prefix("-l") { [INFO] [stdout] 50 ~ println!("cargo:rustc-link-lib={}", ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking env_home v0.1.0 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:20:56 [INFO] [stdout] | [INFO] [stdout] 20 | pub static CYRUS_ABI: Lazy = Lazy::new(|| Cyrus_ABI_Impl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cyrus_ABI_Impl::new` [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] --> crates/cyrusc_abi/src/mangler.rs:21:48 [INFO] [stdout] | [INFO] [stdout] 21 | pub static C_ABI: Lazy = Lazy::new(|| C_ABI_Impl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `C_ABI_Impl::new` [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: you should consider adding a `Default` implementation for `Cyrus_ABI_Impl` [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new() -> Self { [INFO] [stdout] 59 | | Self {} [INFO] [stdout] 60 | | } [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] 57 + impl Default for Cyrus_ABI_Impl { [INFO] [stdout] 58 + fn default() -> Self { [INFO] [stdout] 59 + Self::new() [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `C_ABI_Impl` [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:126:5 [INFO] [stdout] | [INFO] [stdout] 126 | / pub fn new() -> Self { [INFO] [stdout] 127 | | Self {} [INFO] [stdout] 128 | | } [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] 125 + impl Default for C_ABI_Impl { [INFO] [stdout] 126 + fn default() -> Self { [INFO] [stdout] 127 + Self::new() [INFO] [stdout] 128 + } [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / impl Default for FuncModifiers { [INFO] [stdout] 36 | | fn default() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [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] 23 + #[derive(Default)] [INFO] [stdout] 24 | pub struct FuncModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for StructModifiers { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self { [INFO] [stdout] 93 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 80 + #[derive(Default)] [INFO] [stdout] 81 | pub struct StructModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / impl Default for EnumModifiers { [INFO] [stdout] 123 | | fn default() -> Self { [INFO] [stdout] 124 | | Self { [INFO] [stdout] 125 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 114 + #[derive(Default)] [INFO] [stdout] 115 | pub struct EnumModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:150:1 [INFO] [stdout] | [INFO] [stdout] 150 | / impl Default for UnionModifiers { [INFO] [stdout] 151 | | fn default() -> Self { [INFO] [stdout] 152 | | Self { [INFO] [stdout] 153 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 141 + #[derive(Default)] [INFO] [stdout] 142 | pub struct UnionModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / impl Default for GlobalVarModifiers { [INFO] [stdout] 181 | | fn default() -> Self { [INFO] [stdout] 182 | | Self { [INFO] [stdout] 183 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 192 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 170 + #[derive(Default)] [INFO] [stdout] 171 | pub struct GlobalVarModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | if self.weak && self.linkage == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.linkage.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_abi/src/modulename.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / if let Some(last) = parts.last_mut() { [INFO] [stdout] 44 | | if let Some(stripped) = last.strip_suffix(".cyrus") { [INFO] [stdout] 45 | | *last = stripped.to_string(); [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(last) = parts.last_mut() [INFO] [stdout] 44 ~ && let Some(stripped) = last.strip_suffix(".cyrus") { [INFO] [stdout] 45 | *last = stripped.to_string(); [INFO] [stdout] 46 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReprAttr` [INFO] [stdout] --> crates/cyrusc_abi/src/repr.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { items: Vec::new() } [INFO] [stdout] 38 | | } [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] 35 + impl Default for ReprAttr { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/visibility.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / impl Default for Visibility { [INFO] [stdout] 24 | | fn default() -> Self { [INFO] [stdout] 25 | | Visibility::Private [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [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] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 18 + #[derive(Default)] [INFO] [stdout] 19 | pub enum Visibility { [INFO] [stdout] 20 | Public, [INFO] [stdout] 21 ~ #[default] [INFO] [stdout] 22 ~ Private, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tokens/src/literals.rs:52:53 [INFO] [stdout] | [INFO] [stdout] 52 | write!(f, "{}", (**integer_type).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: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tokens/src/literals.rs:69:51 [INFO] [stdout] | [INFO] [stdout] 69 | write!(f, "{}", (**float_type).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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_tokens/src/loc.rs:37:1 [INFO] [stdout] | [INFO] [stdout] 37 | / impl Default for Location { [INFO] [stdout] 38 | | fn default() -> Self { [INFO] [stdout] 39 | | Self { [INFO] [stdout] 40 | | line: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [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] 20 + #[derive(Default)] [INFO] [stdout] 21 | pub struct Location { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_tokens/src/loc.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | / impl Default for Span { [INFO] [stdout] 59 | | fn default() -> Self { [INFO] [stdout] 60 | | Self { [INFO] [stdout] 61 | | start: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 65 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 47 + #[derive(Default)] [INFO] [stdout] 48 | pub struct Span { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tokens/src/lib.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / match self { [INFO] [stdout] 198 | | TokenKind::UInt [INFO] [stdout] 199 | | | TokenKind::UInt8 [INFO] [stdout] 200 | | | TokenKind::UInt16 [INFO] [stdout] ... | [INFO] [stdout] 206 | | _ => false, [INFO] [stdout] 207 | | } [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] 197 ~ matches!(self, TokenKind::UInt [INFO] [stdout] 198 + | TokenKind::UInt8 [INFO] [stdout] 199 + | TokenKind::UInt16 [INFO] [stdout] 200 + | TokenKind::UInt32 [INFO] [stdout] 201 + | TokenKind::UInt64 [INFO] [stdout] 202 + | TokenKind::UInt128 [INFO] [stdout] 203 + | TokenKind::UIntPtr [INFO] [stdout] 204 + | TokenKind::USize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tokens/src/lib.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / match self { [INFO] [stdout] 212 | | TokenKind::EOF => true, [INFO] [stdout] 213 | | _ => false, [INFO] [stdout] 214 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 211 - match self { [INFO] [stdout] 212 - TokenKind::EOF => true, [INFO] [stdout] 213 - _ => false, [INFO] [stdout] 214 - } [INFO] [stdout] 211 + matches!(self, TokenKind::EOF) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_ast v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_ast) [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tokens/src/literals.rs:52:53 [INFO] [stdout] | [INFO] [stdout] 52 | write!(f, "{}", (**integer_type).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: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tokens/src/literals.rs:69:51 [INFO] [stdout] | [INFO] [stdout] 69 | write!(f, "{}", (**float_type).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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_tokens/src/loc.rs:37:1 [INFO] [stdout] | [INFO] [stdout] 37 | / impl Default for Location { [INFO] [stdout] 38 | | fn default() -> Self { [INFO] [stdout] 39 | | Self { [INFO] [stdout] 40 | | line: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [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] 20 + #[derive(Default)] [INFO] [stdout] 21 | pub struct Location { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_tokens/src/loc.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | / impl Default for Span { [INFO] [stdout] 59 | | fn default() -> Self { [INFO] [stdout] 60 | | Self { [INFO] [stdout] 61 | | start: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 65 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 47 + #[derive(Default)] [INFO] [stdout] 48 | pub struct Span { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tokens/src/lib.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / match self { [INFO] [stdout] 198 | | TokenKind::UInt [INFO] [stdout] 199 | | | TokenKind::UInt8 [INFO] [stdout] 200 | | | TokenKind::UInt16 [INFO] [stdout] ... | [INFO] [stdout] 206 | | _ => false, [INFO] [stdout] 207 | | } [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] 197 ~ matches!(self, TokenKind::UInt [INFO] [stdout] 198 + | TokenKind::UInt8 [INFO] [stdout] 199 + | TokenKind::UInt16 [INFO] [stdout] 200 + | TokenKind::UInt32 [INFO] [stdout] 201 + | TokenKind::UInt64 [INFO] [stdout] 202 + | TokenKind::UInt128 [INFO] [stdout] 203 + | TokenKind::UIntPtr [INFO] [stdout] 204 + | TokenKind::USize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tokens/src/lib.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / match self { [INFO] [stdout] 212 | | TokenKind::EOF => true, [INFO] [stdout] 213 | | _ => false, [INFO] [stdout] 214 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 211 - match self { [INFO] [stdout] 212 - TokenKind::EOF => true, [INFO] [stdout] 213 - _ => false, [INFO] [stdout] 214 - } [INFO] [stdout] 211 + matches!(self, TokenKind::EOF) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:20:56 [INFO] [stdout] | [INFO] [stdout] 20 | pub static CYRUS_ABI: Lazy = Lazy::new(|| Cyrus_ABI_Impl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cyrus_ABI_Impl::new` [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] --> crates/cyrusc_abi/src/mangler.rs:21:48 [INFO] [stdout] | [INFO] [stdout] 21 | pub static C_ABI: Lazy = Lazy::new(|| C_ABI_Impl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `C_ABI_Impl::new` [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: you should consider adding a `Default` implementation for `Cyrus_ABI_Impl` [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new() -> Self { [INFO] [stdout] 59 | | Self {} [INFO] [stdout] 60 | | } [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] 57 + impl Default for Cyrus_ABI_Impl { [INFO] [stdout] 58 + fn default() -> Self { [INFO] [stdout] 59 + Self::new() [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `C_ABI_Impl` [INFO] [stdout] --> crates/cyrusc_abi/src/mangler.rs:126:5 [INFO] [stdout] | [INFO] [stdout] 126 | / pub fn new() -> Self { [INFO] [stdout] 127 | | Self {} [INFO] [stdout] 128 | | } [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] 125 + impl Default for C_ABI_Impl { [INFO] [stdout] 126 + fn default() -> Self { [INFO] [stdout] 127 + Self::new() [INFO] [stdout] 128 + } [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / impl Default for FuncModifiers { [INFO] [stdout] 36 | | fn default() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [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] 23 + #[derive(Default)] [INFO] [stdout] 24 | pub struct FuncModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for StructModifiers { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self { [INFO] [stdout] 93 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 80 + #[derive(Default)] [INFO] [stdout] 81 | pub struct StructModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / impl Default for EnumModifiers { [INFO] [stdout] 123 | | fn default() -> Self { [INFO] [stdout] 124 | | Self { [INFO] [stdout] 125 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 114 + #[derive(Default)] [INFO] [stdout] 115 | pub struct EnumModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:150:1 [INFO] [stdout] | [INFO] [stdout] 150 | / impl Default for UnionModifiers { [INFO] [stdout] 151 | | fn default() -> Self { [INFO] [stdout] 152 | | Self { [INFO] [stdout] 153 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 141 + #[derive(Default)] [INFO] [stdout] 142 | pub struct UnionModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / impl Default for GlobalVarModifiers { [INFO] [stdout] 181 | | fn default() -> Self { [INFO] [stdout] 182 | | Self { [INFO] [stdout] 183 | | vis: Visibility::default(), [INFO] [stdout] ... | [INFO] [stdout] 192 | | } [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] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 170 + #[derive(Default)] [INFO] [stdout] 171 | pub struct GlobalVarModifiers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> crates/cyrusc_abi/src/modifiers.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | if self.weak && self.linkage == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.linkage.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_abi/src/modulename.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / if let Some(last) = parts.last_mut() { [INFO] [stdout] 44 | | if let Some(stripped) = last.strip_suffix(".cyrus") { [INFO] [stdout] 45 | | *last = stripped.to_string(); [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(last) = parts.last_mut() [INFO] [stdout] 44 ~ && let Some(stripped) = last.strip_suffix(".cyrus") { [INFO] [stdout] 45 | *last = stripped.to_string(); [INFO] [stdout] 46 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_tui_utils v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_tui_utils) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReprAttr` [INFO] [stdout] --> crates/cyrusc_abi/src/repr.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { items: Vec::new() } [INFO] [stdout] 38 | | } [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] 35 + impl Default for ReprAttr { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/cyrusc_abi/src/visibility.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / impl Default for Visibility { [INFO] [stdout] 24 | | fn default() -> Self { [INFO] [stdout] 25 | | Visibility::Private [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [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] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 18 + #[derive(Default)] [INFO] [stdout] 19 | pub enum Visibility { [INFO] [stdout] 20 | Public, [INFO] [stdout] 21 ~ #[default] [INFO] [stdout] 22 ~ Private, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_fs_utils v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_fs_utils) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:68:24 [INFO] [stdout] | [INFO] [stdout] 68 | if !(singles.len() - 1 == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(singles.len() - 1 != idx)` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:94:79 [INFO] [stdout] | [INFO] [stdout] 94 | ... params.push_str(&format!(", {}...", type_specifier.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: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:99:70 [INFO] [stdout] | [INFO] [stdout] 99 | write!(f, "fn ({}) {}", params, func_type.return_type.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:151:73 [INFO] [stdout] | [INFO] [stdout] 151 | ... write!(f, "{} = {}", ident.as_string(), expr.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:280:62 [INFO] [stdout] | [INFO] [stdout] 280 | Expr::Literal(literal) => write!(f, "{}", literal.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:324:72 [INFO] [stdout] | [INFO] [stdout] 324 | Expr::ModuleImport(struct_init.struct_name.clone()).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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:352:46 [INFO] [stdout] | [INFO] [stdout] 352 | write!(f, "{}", module_import.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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:400:5 [INFO] [stdout] | [INFO] [stdout] 399 | let str = exprs.iter().map(|c| c.to_string()).collect::>().join(", "); [INFO] [stdout] | ---------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 400 | str [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 399 ~ [INFO] [stdout] 400 ~ exprs.iter().map(|c| c.to_string()).collect::>().join(", ") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:472:28 [INFO] [stdout] | [INFO] [stdout] 472 | pub fn format_exprs(exprs: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 472 - pub fn format_exprs(exprs: &Vec) -> String { [INFO] [stdout] 472 + pub fn format_exprs(exprs: &[Expr]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:476:28 [INFO] [stdout] | [INFO] [stdout] 476 | pub fn format_stmts(stmts: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 476 - pub fn format_stmts(stmts: &Vec) -> String { [INFO] [stdout] 476 + pub fn format_stmts(stmts: &[Stmt]) -> String { [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] --> crates/cyrusc_ast/src/lib.rs:56:42 [INFO] [stdout] | [INFO] [stdout] 56 | self.body.iter().for_each(|stmt| match stmt { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 57 | | Stmt::Import(import) => { [INFO] [stdout] 58 | | imports.push(import.clone()); [INFO] [stdout] ... | [INFO] [stdout] 61 | | }); [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] 56 ~ self.body.iter().for_each(|stmt| if let Stmt::Import(import) = stmt { [INFO] [stdout] 57 + imports.push(import.clone()); [INFO] [stdout] 58 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:68:24 [INFO] [stdout] | [INFO] [stdout] 68 | if !(singles.len() - 1 == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(singles.len() - 1 != idx)` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:94:79 [INFO] [stdout] | [INFO] [stdout] 94 | ... params.push_str(&format!(", {}...", type_specifier.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: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:99:70 [INFO] [stdout] | [INFO] [stdout] 99 | write!(f, "fn ({}) {}", params, func_type.return_type.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:151:73 [INFO] [stdout] | [INFO] [stdout] 151 | ... write!(f, "{} = {}", ident.as_string(), expr.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:280:62 [INFO] [stdout] | [INFO] [stdout] 280 | Expr::Literal(literal) => write!(f, "{}", literal.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:324:72 [INFO] [stdout] | [INFO] [stdout] 324 | Expr::ModuleImport(struct_init.struct_name.clone()).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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:352:46 [INFO] [stdout] | [INFO] [stdout] 352 | write!(f, "{}", module_import.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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:400:5 [INFO] [stdout] | [INFO] [stdout] 399 | let str = exprs.iter().map(|c| c.to_string()).collect::>().join(", "); [INFO] [stdout] | ---------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 400 | str [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 399 ~ [INFO] [stdout] 400 ~ exprs.iter().map(|c| c.to_string()).collect::>().join(", ") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:472:28 [INFO] [stdout] | [INFO] [stdout] 472 | pub fn format_exprs(exprs: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 472 - pub fn format_exprs(exprs: &Vec) -> String { [INFO] [stdout] 472 + pub fn format_exprs(exprs: &[Expr]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_ast/src/format.rs:476:28 [INFO] [stdout] | [INFO] [stdout] 476 | pub fn format_stmts(stmts: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 476 - pub fn format_stmts(stmts: &Vec) -> String { [INFO] [stdout] 476 + pub fn format_stmts(stmts: &[Stmt]) -> String { [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] --> crates/cyrusc_ast/src/lib.rs:56:42 [INFO] [stdout] | [INFO] [stdout] 56 | self.body.iter().for_each(|stmt| match stmt { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 57 | | Stmt::Import(import) => { [INFO] [stdout] 58 | | imports.push(import.clone()); [INFO] [stdout] ... | [INFO] [stdout] 61 | | }); [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] 56 ~ self.body.iter().for_each(|stmt| if let Stmt::Import(import) = stmt { [INFO] [stdout] 57 + imports.push(import.clone()); [INFO] [stdout] 58 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | TypeSpecifier::TypeToken(token) => (token.loc.clone(), token.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:406:45 [INFO] [stdout] | [INFO] [stdout] 406 | TypeSpecifier::Ident(ident) => (ident.loc.clone(), ident.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:409:60 [INFO] [stdout] | [INFO] [stdout] 409 | TypeSpecifier::ModuleImport(module_import) => (module_import.loc.clone(), module_import.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:412:18 [INFO] [stdout] | [INFO] [stdout] 412 | (unnamed_struct_type.loc.clone(), unnamed_struct_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_struct_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:415:18 [INFO] [stdout] | [INFO] [stdout] 415 | (unnamed_union_type.loc.clone(), unnamed_union_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:418:18 [INFO] [stdout] | [INFO] [stdout] 418 | (unnamed_enum_type.loc.clone(), unnamed_enum_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:420:52 [INFO] [stdout] | [INFO] [stdout] 420 | TypeSpecifier::FuncType(func_type) => (func_type.loc.clone(), func_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | TypeSpecifier::Tuple(tuple_type) => (tuple_type.loc.clone(), tuple_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:422:58 [INFO] [stdout] | [INFO] [stdout] 422 | TypeSpecifier::GenericInst(generic_inst) => (generic_inst.loc.clone(), generic_inst.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_inst.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:423:52 [INFO] [stdout] | [INFO] [stdout] 423 | TypeSpecifier::SelfType(self_type) => (self_type.loc.clone(), self_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:523:1 [INFO] [stdout] | [INFO] [stdout] 523 | / pub enum Stmt { [INFO] [stdout] 524 | | Import(Import), [INFO] [stdout] 525 | | Variable(Variable), [INFO] [stdout] 526 | | ExportTuple(ExportTuple), [INFO] [stdout] ... | [INFO] [stdout] 532 | | For(For), [INFO] [stdout] | | -------- the largest variant contains at least 1248 bytes [INFO] [stdout] ... | [INFO] [stdout] 544 | | GlobalVar(GlobalVar), [INFO] [stdout] | | -------------------- the second-largest variant contains at least 608 bytes [INFO] [stdout] ... | [INFO] [stdout] 547 | | Goto(Goto), [INFO] [stdout] 548 | | } [INFO] [stdout] | |_^ the entire enum is at least 1248 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] 532 - For(For), [INFO] [stdout] 532 + For(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | TypeSpecifier::TypeToken(token) => (token.loc.clone(), token.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:406:45 [INFO] [stdout] | [INFO] [stdout] 406 | TypeSpecifier::Ident(ident) => (ident.loc.clone(), ident.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:409:60 [INFO] [stdout] | [INFO] [stdout] 409 | TypeSpecifier::ModuleImport(module_import) => (module_import.loc.clone(), module_import.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:412:18 [INFO] [stdout] | [INFO] [stdout] 412 | (unnamed_struct_type.loc.clone(), unnamed_struct_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_struct_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:415:18 [INFO] [stdout] | [INFO] [stdout] 415 | (unnamed_union_type.loc.clone(), unnamed_union_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:418:18 [INFO] [stdout] | [INFO] [stdout] 418 | (unnamed_enum_type.loc.clone(), unnamed_enum_type.span.end) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:420:52 [INFO] [stdout] | [INFO] [stdout] 420 | TypeSpecifier::FuncType(func_type) => (func_type.loc.clone(), func_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | TypeSpecifier::Tuple(tuple_type) => (tuple_type.loc.clone(), tuple_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:422:58 [INFO] [stdout] | [INFO] [stdout] 422 | TypeSpecifier::GenericInst(generic_inst) => (generic_inst.loc.clone(), generic_inst.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_inst.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:423:52 [INFO] [stdout] | [INFO] [stdout] 423 | TypeSpecifier::SelfType(self_type) => (self_type.loc.clone(), self_type.span.end), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:523:1 [INFO] [stdout] | [INFO] [stdout] 523 | / pub enum Stmt { [INFO] [stdout] 524 | | Import(Import), [INFO] [stdout] 525 | | Variable(Variable), [INFO] [stdout] 526 | | ExportTuple(ExportTuple), [INFO] [stdout] ... | [INFO] [stdout] 532 | | For(For), [INFO] [stdout] | | -------- the largest variant contains at least 1248 bytes [INFO] [stdout] ... | [INFO] [stdout] 544 | | GlobalVar(GlobalVar), [INFO] [stdout] | | -------------------- the second-largest variant contains at least 608 bytes [INFO] [stdout] ... | [INFO] [stdout] 547 | | Goto(Goto), [INFO] [stdout] 548 | | } [INFO] [stdout] | |_^ the entire enum is at least 1248 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] 532 - For(For), [INFO] [stdout] 532 + For(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:704:18 [INFO] [stdout] | [INFO] [stdout] 704 | loc: self.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:801:1 [INFO] [stdout] | [INFO] [stdout] 801 | / pub enum SwitchCasePattern { [INFO] [stdout] 802 | | Expr(Expr), [INFO] [stdout] | | ---------- the second-largest variant contains at least 336 bytes [INFO] [stdout] 803 | | Range(Range), [INFO] [stdout] | | ------------ the largest variant contains at least 720 bytes [INFO] [stdout] 804 | | Ident(Ident), [INFO] [stdout] 805 | | EnumVariant(Ident, Vec), [INFO] [stdout] 806 | | } [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] 803 - Range(Range), [INFO] [stdout] 803 + Range(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:861:18 [INFO] [stdout] | [INFO] [stdout] 861 | loc: self.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:704:18 [INFO] [stdout] | [INFO] [stdout] 704 | loc: self.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:801:1 [INFO] [stdout] | [INFO] [stdout] 801 | / pub enum SwitchCasePattern { [INFO] [stdout] 802 | | Expr(Expr), [INFO] [stdout] | | ---------- the second-largest variant contains at least 336 bytes [INFO] [stdout] 803 | | Range(Range), [INFO] [stdout] | | ------------ the largest variant contains at least 720 bytes [INFO] [stdout] 804 | | Ident(Ident), [INFO] [stdout] 805 | | EnumVariant(Ident, Vec), [INFO] [stdout] 806 | | } [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] 803 - Range(Range), [INFO] [stdout] 803 + Range(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:861:18 [INFO] [stdout] | [INFO] [stdout] 861 | loc: self.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1003:43 [INFO] [stdout] | [INFO] [stdout] 1003 | Stmt::Interface(interface) => interface.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1004:41 [INFO] [stdout] | [INFO] [stdout] 1004 | Stmt::Variable(variable) => variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1005:55 [INFO] [stdout] | [INFO] [stdout] 1005 | Stmt::ExportTuple(export_tuple_values) => export_tuple_values.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple_values.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1006:34 [INFO] [stdout] | [INFO] [stdout] 1006 | Stmt::If(if_stmt) => if_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `if_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1007:34 [INFO] [stdout] | [INFO] [stdout] 1007 | Stmt::Return(ret) => ret.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ret.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1008:40 [INFO] [stdout] | [INFO] [stdout] 1008 | Stmt::FuncDef(func_def) => func_def.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1009:42 [INFO] [stdout] | [INFO] [stdout] 1009 | Stmt::FuncDecl(func_decl) => func_decl.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1010:36 [INFO] [stdout] | [INFO] [stdout] 1010 | Stmt::For(for_stmt) => for_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `for_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1011:40 [INFO] [stdout] | [INFO] [stdout] 1011 | Stmt::While(while_stmt) => while_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `while_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1012:39 [INFO] [stdout] | [INFO] [stdout] 1012 | Stmt::Foreach(foreach) => foreach.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `foreach.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1013:37 [INFO] [stdout] | [INFO] [stdout] 1013 | Stmt::Switch(switch) => switch.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `switch.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1014:42 [INFO] [stdout] | [INFO] [stdout] 1014 | Stmt::Struct(struct_stmt) => struct_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1015:37 [INFO] [stdout] | [INFO] [stdout] 1015 | Stmt::Import(import) => import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1016:44 [INFO] [stdout] | [INFO] [stdout] 1016 | Stmt::BlockStmt(block_stmt) => block_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1017:38 [INFO] [stdout] | [INFO] [stdout] 1017 | Stmt::Enum(enum_stmt) => enum_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1018:35 [INFO] [stdout] | [INFO] [stdout] 1018 | Stmt::Union(union) => union.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1019:33 [INFO] [stdout] | [INFO] [stdout] 1019 | Stmt::Break(brk) => brk.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `brk.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1020:37 [INFO] [stdout] | [INFO] [stdout] 1020 | Stmt::Continue(cont) => cont.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cont.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1021:39 [INFO] [stdout] | [INFO] [stdout] 1021 | Stmt::Typedef(typedef) => typedef.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1022:49 [INFO] [stdout] | [INFO] [stdout] 1022 | Stmt::GlobalVar(global_variable) => global_variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1023:35 [INFO] [stdout] | [INFO] [stdout] 1023 | Stmt::Defer(defer) => defer.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `defer.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1024:35 [INFO] [stdout] | [INFO] [stdout] 1024 | Stmt::Label(label) => label.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `label.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1025:33 [INFO] [stdout] | [INFO] [stdout] 1025 | Stmt::Goto(goto) => goto.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `goto.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1003:43 [INFO] [stdout] | [INFO] [stdout] 1003 | Stmt::Interface(interface) => interface.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1004:41 [INFO] [stdout] | [INFO] [stdout] 1004 | Stmt::Variable(variable) => variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1005:55 [INFO] [stdout] | [INFO] [stdout] 1005 | Stmt::ExportTuple(export_tuple_values) => export_tuple_values.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple_values.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1006:34 [INFO] [stdout] | [INFO] [stdout] 1006 | Stmt::If(if_stmt) => if_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `if_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1007:34 [INFO] [stdout] | [INFO] [stdout] 1007 | Stmt::Return(ret) => ret.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ret.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1008:40 [INFO] [stdout] | [INFO] [stdout] 1008 | Stmt::FuncDef(func_def) => func_def.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1009:42 [INFO] [stdout] | [INFO] [stdout] 1009 | Stmt::FuncDecl(func_decl) => func_decl.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1010:36 [INFO] [stdout] | [INFO] [stdout] 1010 | Stmt::For(for_stmt) => for_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `for_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1011:40 [INFO] [stdout] | [INFO] [stdout] 1011 | Stmt::While(while_stmt) => while_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `while_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1012:39 [INFO] [stdout] | [INFO] [stdout] 1012 | Stmt::Foreach(foreach) => foreach.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `foreach.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1013:37 [INFO] [stdout] | [INFO] [stdout] 1013 | Stmt::Switch(switch) => switch.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `switch.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1014:42 [INFO] [stdout] | [INFO] [stdout] 1014 | Stmt::Struct(struct_stmt) => struct_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1015:37 [INFO] [stdout] | [INFO] [stdout] 1015 | Stmt::Import(import) => import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1016:44 [INFO] [stdout] | [INFO] [stdout] 1016 | Stmt::BlockStmt(block_stmt) => block_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1017:38 [INFO] [stdout] | [INFO] [stdout] 1017 | Stmt::Enum(enum_stmt) => enum_stmt.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1018:35 [INFO] [stdout] | [INFO] [stdout] 1018 | Stmt::Union(union) => union.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1019:33 [INFO] [stdout] | [INFO] [stdout] 1019 | Stmt::Break(brk) => brk.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `brk.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1020:37 [INFO] [stdout] | [INFO] [stdout] 1020 | Stmt::Continue(cont) => cont.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cont.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1021:39 [INFO] [stdout] | [INFO] [stdout] 1021 | Stmt::Typedef(typedef) => typedef.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1022:49 [INFO] [stdout] | [INFO] [stdout] 1022 | Stmt::GlobalVar(global_variable) => global_variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1023:35 [INFO] [stdout] | [INFO] [stdout] 1023 | Stmt::Defer(defer) => defer.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `defer.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1024:35 [INFO] [stdout] | [INFO] [stdout] 1024 | Stmt::Label(label) => label.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `label.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_ast/src/lib.rs:1025:33 [INFO] [stdout] | [INFO] [stdout] 1025 | Stmt::Goto(goto) => goto.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `goto.loc` [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] [stderr] Compiling llvm-sys v181.3.0 [INFO] [stderr] Checking which v8.0.0 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling inkwell_internals v0.12.0 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking cyrusc_strescape v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_strescape) [INFO] [stderr] Checking cyrusc_diagcentral v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_diagcentral) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DiagReporter` [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn new() -> Self { [INFO] [stdout] 50 | | Self { diags: Vec::new() } [INFO] [stdout] 51 | | } [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] 48 + impl Default for DiagReporter { [INFO] [stdout] 49 + fn default() -> Self { [INFO] [stdout] 50 + Self::new() [INFO] [stdout] 51 + } [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DiagReporter` [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn new() -> Self { [INFO] [stdout] 50 | | Self { diags: Vec::new() } [INFO] [stdout] 51 | | } [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] 48 + impl Default for DiagReporter { [INFO] [stdout] 49 + fn default() -> Self { [INFO] [stdout] 50 + Self::new() [INFO] [stdout] 51 + } [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:139:57 [INFO] [stdout] | [INFO] [stdout] 139 | ... formatted.push_str(&format!("{}", highlighted.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `highlighted.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:172:65 [INFO] [stdout] | [INFO] [stdout] 172 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:174:65 [INFO] [stdout] | [INFO] [stdout] 174 | ... formatted.push_str(&format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 175 | | ... "{}", [INFO] [stdout] 176 | | ... "~".repeat(highlighted_len).color(get_highlight_color!()) [INFO] [stdout] 177 | | ... )); [INFO] [stdout] | |_______________________^ help: consider using `.to_string()`: `"~".repeat(highlighted_len).color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:180:61 [INFO] [stdout] | [INFO] [stdout] 180 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:187:53 [INFO] [stdout] | [INFO] [stdout] 187 | ... formatted.push_str(&format!("{}", line_content.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_content.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:192:49 [INFO] [stdout] | [INFO] [stdout] 192 | ... formatted.push_str(&format!("{}", line_content.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_content.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:205:53 [INFO] [stdout] | [INFO] [stdout] 205 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | formatted.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `formatted.push('\n')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:220:17 [INFO] [stdout] | [INFO] [stdout] 220 | formatted.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `formatted.push('\n')` [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] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> crates/cyrusc_diagcentral/src/tests.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / mod tests { [INFO] [stdout] 19 | | use crate::reporter::*; [INFO] [stdout] 20 | | use crate::*; [INFO] [stdout] 21 | | use std::fmt; [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:139:57 [INFO] [stdout] | [INFO] [stdout] 139 | ... formatted.push_str(&format!("{}", highlighted.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `highlighted.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:172:65 [INFO] [stdout] | [INFO] [stdout] 172 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:174:65 [INFO] [stdout] | [INFO] [stdout] 174 | ... formatted.push_str(&format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 175 | | ... "{}", [INFO] [stdout] 176 | | ... "~".repeat(highlighted_len).color(get_highlight_color!()) [INFO] [stdout] 177 | | ... )); [INFO] [stdout] | |_______________________^ help: consider using `.to_string()`: `"~".repeat(highlighted_len).color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:180:61 [INFO] [stdout] | [INFO] [stdout] 180 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:187:53 [INFO] [stdout] | [INFO] [stdout] 187 | ... formatted.push_str(&format!("{}", line_content.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_content.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:192:49 [INFO] [stdout] | [INFO] [stdout] 192 | ... formatted.push_str(&format!("{}", line_content.color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_content.color(get_highlight_color!()).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] --> crates/cyrusc_diagcentral/src/reporter.rs:205:53 [INFO] [stdout] | [INFO] [stdout] 205 | ... formatted.push_str(&format!("{}", "^".color(get_highlight_color!()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"^".color(get_highlight_color!()).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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | formatted.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `formatted.push('\n')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_diagcentral/src/reporter.rs:220:17 [INFO] [stdout] | [INFO] [stdout] 220 | formatted.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `formatted.push('\n')` [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] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_lexer v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_lexer) [INFO] [stderr] Checking cyrusc_tast v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_tast) [INFO] [stderr] Checking cyrusc_scaffold v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_scaffold) [INFO] [stdout] warning: the `ty @ _` pattern can be written as just `ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | ty @ _ => ty, [INFO] [stdout] | ^^^^^^ help: try: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `sema_ty @ _` pattern can be written as just `sema_ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:291:13 [INFO] [stdout] | [INFO] [stdout] 291 | sema_ty @ _ => sema_ty, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `sema_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `sema_ty @ _` pattern can be written as just `sema_ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | sema_ty @ _ => sema_ty, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `sema_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `ty @ _` pattern can be written as just `ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | ty @ _ => ty, [INFO] [stdout] | ^^^^^^ help: try: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `sema_ty @ _` pattern can be written as just `sema_ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:291:13 [INFO] [stdout] | [INFO] [stdout] 291 | sema_ty @ _ => sema_ty, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `sema_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `sema_ty @ _` pattern can be written as just `sema_ty` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | sema_ty @ _ => sema_ty, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `sema_ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_parser v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_parser) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:59:25 [INFO] [stdout] | [INFO] [stdout] 59 | span: span, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | span: span, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:763:13 [INFO] [stdout] | [INFO] [stdout] 763 | loc: loc, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:315:33 [INFO] [stdout] | [INFO] [stdout] 315 | ... start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:59:25 [INFO] [stdout] | [INFO] [stdout] 59 | span: span, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | span: span, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:763:13 [INFO] [stdout] | [INFO] [stdout] 763 | loc: loc, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:315:33 [INFO] [stdout] | [INFO] [stdout] 315 | ... start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/exprs.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / pub enum TypedExprKind { [INFO] [stdout] 48 | | Symbol(SymbolID, SourceLoc), [INFO] [stdout] 49 | | Literal(TypedLiteralExpr), [INFO] [stdout] 50 | | Prefix(TypedPrefixExpr), [INFO] [stdout] ... | [INFO] [stdout] 64 | | MethodCall(TypedMethodCall), [INFO] [stdout] | | --------------------------- the largest variant contains at least 1360 bytes [INFO] [stdout] ... | [INFO] [stdout] 67 | | Lambda(TypedLambdaExpr), [INFO] [stdout] | | ----------------------- the second-largest variant contains at least 392 bytes [INFO] [stdout] ... | [INFO] [stdout] 71 | | SemanticType(SemanticType), [INFO] [stdout] 72 | | } [INFO] [stdout] | |_^ the entire enum is at least 1360 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] 64 - MethodCall(TypedMethodCall), [INFO] [stdout] 64 + MethodCall(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/exprs.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match self { [INFO] [stdout] 144 | | TypedExprKind::Dynamic(_) => true, [INFO] [stdout] 145 | | _ => false, [INFO] [stdout] 146 | | } [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] 143 - match self { [INFO] [stdout] 144 - TypedExprKind::Dynamic(_) => true, [INFO] [stdout] 145 - _ => false, [INFO] [stdout] 146 - } [INFO] [stdout] 143 + matches!(self, TypedExprKind::Dynamic(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:29:38 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn format_typed_exprs<'a>(exprs: &Vec, format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn format_typed_exprs<'a>(exprs: &Vec, format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] 29 + pub fn format_typed_exprs<'a>(exprs: &[TypedExprStmt], format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | return "true".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 72 - return "true".to_string(); [INFO] [stdout] 72 + "true".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:74:21 [INFO] [stdout] | [INFO] [stdout] 74 | return "false".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return "false".to_string(); [INFO] [stdout] 74 + "false".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:62:44 [INFO] [stdout] | [INFO] [stdout] 62 | StringPrefix::C => fmt.push_str("c"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.push('c')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | StringPrefix::B => fmt.push_str("b"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.push('b')` [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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | AssignKind::Default => fmt.push_str("="), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:130:34 [INFO] [stdout] | [INFO] [stdout] 130 | let array_type_fmt = typed_array [INFO] [stdout] | __________________________________^ [INFO] [stdout] 131 | | .array_type [INFO] [stdout] 132 | | .as_ref() [INFO] [stdout] 133 | | .and_then(|sema_ty| Some(format_sema_ty(sema_ty.clone(), format_symbol))) [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 130 ~ let array_type_fmt = typed_array [INFO] [stdout] 131 + .array_type [INFO] [stdout] 132 + .as_ref().map(|sema_ty| format_sema_ty(sema_ty.clone(), format_symbol)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | fmt.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | fmt.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:372:47 [INFO] [stdout] | [INFO] [stdout] 372 | SemanticType::UnresolvedSymbol(..) => format!("UNKNOWN"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"UNKNOWN".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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | fmt.push_str("["); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | fmt.push_str("]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | debug_assert!(generic_params.list.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!generic_params.list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:77:23 [INFO] [stdout] | [INFO] [stdout] 77 | debug_assert!(self.generic_params.list.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.generic_params.list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `generics::mapping_ctx::GenericMappingEntry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:142:46 [INFO] [stdout] | [INFO] [stdout] 142 | mapping_ctx.insert_named(GenericMappingEntry::from(typed_identifier), ty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `GenericMappingEntry::from()`: `typed_identifier` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / if mapping_ctx [INFO] [stdout] 162 | | .resolve_with_name(mapping_ctx_arena.clone(), &generic_param.param_name.name) [INFO] [stdout] 163 | | .is_none() [INFO] [stdout] ... | [INFO] [stdout] 171 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ .is_none() [INFO] [stdout] 164 ~ && let Some(default) = &generic_param.default { [INFO] [stdout] 165 | mapping_ctx.insert_named( [INFO] [stdout] ... [INFO] [stdout] 168 | ); [INFO] [stdout] 169 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:280:16 [INFO] [stdout] | [INFO] [stdout] 280 | if collected_type_args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!collected_type_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 426 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:435:5 [INFO] [stdout] | [INFO] [stdout] 435 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:76:19 [INFO] [stdout] | [INFO] [stdout] 76 | debug_assert!(final_generic_params.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!final_generic_params.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:133:43 [INFO] [stdout] | [INFO] [stdout] 133 | current_generic_mapping_ctx = inner_mapping_ctx [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 134 | | .parent [INFO] [stdout] 135 | | .and_then(|parent_id| Some(mapping_ctx_arena.get(parent_id).unwrap())) [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 133 ~ current_generic_mapping_ctx = inner_mapping_ctx [INFO] [stdout] 134 + .parent.map(|parent_id| mapping_ctx_arena.get(parent_id).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | / if !self.named.contains_key(&entry) { [INFO] [stdout] 202 | | self.named.insert(entry, ty); [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ help: try: `self.named.entry(entry).or_insert(ty);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GenericTemplateRegistry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/monomorph.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn new() -> Self { [INFO] [stdout] 57 | | Self { map: HashMap::new() } [INFO] [stdout] 58 | | } [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] 55 + impl Default for GenericTemplateRegistry { [INFO] [stdout] 56 + fn default() -> Self { [INFO] [stdout] 57 + Self::new() [INFO] [stdout] 58 + } [INFO] [stdout] 59 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MonomorphRegistry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/monomorph.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | / pub fn new() -> Self { [INFO] [stdout] 118 | | Self { [INFO] [stdout] 119 | | next_id: 1, [INFO] [stdout] 120 | | map: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 124 | | } [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] 116 + impl Default for MonomorphRegistry { [INFO] [stdout] 117 + fn default() -> Self { [INFO] [stdout] 118 + Self::new() [INFO] [stdout] 119 + } [INFO] [stdout] 120 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/substitute.rs:169:20 [INFO] [stdout] | [INFO] [stdout] 169 | let variadic = func_params.variadic.clone().and_then(|variadic| match &variadic { [INFO] [stdout] | ____________________^ [INFO] [stdout] 170 | | unsubstituted_variadic_param @ TypedFuncVariadicParams::Typed(ident, sema_ty) => { [INFO] [stdout] 171 | | if let Some(sema_ty) = substitute_type(mapping_ctx_arena, sema_ty.clone(), ctx.clone()) { [INFO] [stdout] 172 | | Some(TypedFuncVariadicParams::Typed(ident.clone(), sema_ty)) [INFO] [stdout] ... | [INFO] [stdout] 177 | | c_style_variadic @ TypedFuncVariadicParams::UntypedCStyle => Some(c_style_variadic.clone()), [INFO] [stdout] 178 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 169 ~ let variadic = func_params.variadic.clone().map(|variadic| match &variadic { [INFO] [stdout] 170 | unsubstituted_variadic_param @ TypedFuncVariadicParams::Typed(ident, sema_ty) => { [INFO] [stdout] 171 | if let Some(sema_ty) = substitute_type(mapping_ctx_arena, sema_ty.clone(), ctx.clone()) { [INFO] [stdout] 172 ~ TypedFuncVariadicParams::Typed(ident.clone(), sema_ty) [INFO] [stdout] 173 | } else { [INFO] [stdout] 174 ~ unsubstituted_variadic_param.clone() [INFO] [stdout] 175 | } [INFO] [stdout] 176 | } [INFO] [stdout] 177 ~ c_style_variadic @ TypedFuncVariadicParams::UntypedCStyle => c_style_variadic.clone(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GenericMappingCtxArenaImpl` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx_arena.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { 0: Vec::new() } [INFO] [stdout] 15 | | } [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] 12 + impl Default for GenericMappingCtxArenaImpl { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx_arena.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | Self { 0: Vec::new() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `Self(Vec::new())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:143:18 [INFO] [stdout] | [INFO] [stdout] 143 | .map(|func_decl| typed_func_decl_as_func_sig(func_decl)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `typed_func_decl_as_func_sig` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Some(func_param_kind) = first_param { [INFO] [stdout] 153 | | if let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 154 | | match self_modifier.kind { [INFO] [stdout] 155 | | SelfModifierKind::Copied => { [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 152 ~ if let Some(func_param_kind) = first_param [INFO] [stdout] 153 ~ && let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 154 | match self_modifier.kind { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Some(func_param_kind) = first_param { [INFO] [stdout] 170 | | if let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 171 | | self_modifier.self_symbol_id = Some(symbol_id); [INFO] [stdout] 172 | | } [INFO] [stdout] 173 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Some(func_param_kind) = first_param [INFO] [stdout] 170 ~ && let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 171 | self_modifier.self_symbol_id = Some(symbol_id); [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / pub enum TypedStmt { [INFO] [stdout] 32 | | Variable(TypedVarStmt), [INFO] [stdout] 33 | | Typedef(TypedTypedefStmt), [INFO] [stdout] 34 | | GlobalVar(TypedGlobalVarStmt), [INFO] [stdout] | | ----------------------------- the second-largest variant contains at least 1824 bytes [INFO] [stdout] ... | [INFO] [stdout] 42 | | For(TypedForStmt), [INFO] [stdout] | | ----------------- the largest variant contains at least 4848 bytes [INFO] [stdout] ... | [INFO] [stdout] 53 | | Goto(TypedGotoStmt), [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ the entire enum is at least 4848 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] 42 - For(TypedForStmt), [INFO] [stdout] 42 + For(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:477:1 [INFO] [stdout] | [INFO] [stdout] 477 | / pub enum TypedSwitchCasePattern { [INFO] [stdout] 478 | | Range(TypedRange), [INFO] [stdout] | | ----------------- the largest variant contains at least 3120 bytes [INFO] [stdout] 479 | | Expr(TypedExprStmt, SourceLoc), [INFO] [stdout] | | ------------------------------ the second-largest variant contains at least 1576 bytes [INFO] [stdout] 480 | | Ident(String, SourceLoc), [INFO] [stdout] 481 | | EnumVariant(String, Vec, SourceLoc), [INFO] [stdout] 482 | | } [INFO] [stdout] | |_^ the entire enum is at least 3120 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] 478 - Range(TypedRange), [INFO] [stdout] 478 + Range(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TypedGenericParamsList` [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:524:5 [INFO] [stdout] | [INFO] [stdout] 524 | / pub fn new() -> Self { [INFO] [stdout] 525 | | Self { list: Vec::new() } [INFO] [stdout] 526 | | } [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] 523 + impl Default for TypedGenericParamsList { [INFO] [stdout] 524 + fn default() -> Self { [INFO] [stdout] 525 + Self::new() [INFO] [stdout] 526 + } [INFO] [stdout] 527 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> crates/cyrusc_tast/src/tests.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / mod tests { [INFO] [stdout] 19 | | use crate::{ [INFO] [stdout] 20 | | exprs::TypedIdentifier, [INFO] [stdout] 21 | | stmts::{TypedGenericParam, TypedGenericParamsList}, [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / match self.const_inner() { [INFO] [stdout] 178 | | SemanticType::GenericType(_) => true, [INFO] [stdout] 179 | | _ => false, [INFO] [stdout] 180 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 177 - match self.const_inner() { [INFO] [stdout] 178 - SemanticType::GenericType(_) => true, [INFO] [stdout] 179 - _ => false, [INFO] [stdout] 180 - } [INFO] [stdout] 177 + matches!(self.const_inner(), SemanticType::GenericType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | / match self.const_inner() { [INFO] [stdout] 255 | | SemanticType::ResolvedSymbol(..) => true, [INFO] [stdout] 256 | | _ => false, [INFO] [stdout] 257 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 254 - match self.const_inner() { [INFO] [stdout] 255 - SemanticType::ResolvedSymbol(..) => true, [INFO] [stdout] 256 - _ => false, [INFO] [stdout] 257 - } [INFO] [stdout] 254 + matches!(self.const_inner(), SemanticType::ResolvedSymbol(..)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | / match self.const_inner() { [INFO] [stdout] 262 | | SemanticType::PlainType(PlainType::Char) => true, [INFO] [stdout] 263 | | _ => false, [INFO] [stdout] 264 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 261 - match self.const_inner() { [INFO] [stdout] 262 - SemanticType::PlainType(PlainType::Char) => true, [INFO] [stdout] 263 - _ => false, [INFO] [stdout] 264 - } [INFO] [stdout] 261 + matches!(self.const_inner(), SemanticType::PlainType(PlainType::Char)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | / match self.const_inner() { [INFO] [stdout] 269 | | SemanticType::SelfType(_) => true, [INFO] [stdout] 270 | | _ => false, [INFO] [stdout] 271 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 268 - match self.const_inner() { [INFO] [stdout] 269 - SemanticType::SelfType(_) => true, [INFO] [stdout] 270 - _ => false, [INFO] [stdout] 271 - } [INFO] [stdout] 268 + matches!(self.const_inner(), SemanticType::SelfType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:319:62 [INFO] [stdout] | [INFO] [stdout] 319 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 320 | | ResolvedSymbol::Struct(symbol_id) => Some(*symbol_id), [INFO] [stdout] 321 | | _ => None, [INFO] [stdout] 322 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:319:42 [INFO] [stdout] | [INFO] [stdout] 319 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 320 | ResolvedSymbol::Struct(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:329:62 [INFO] [stdout] | [INFO] [stdout] 329 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 330 | | ResolvedSymbol::Union(symbol_id) => Some(*symbol_id), [INFO] [stdout] 331 | | _ => None, [INFO] [stdout] 332 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:329:42 [INFO] [stdout] | [INFO] [stdout] 329 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 330 | ResolvedSymbol::Union(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:339:62 [INFO] [stdout] | [INFO] [stdout] 339 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 340 | | ResolvedSymbol::Enum(symbol_id) => Some(*symbol_id), [INFO] [stdout] 341 | | _ => None, [INFO] [stdout] 342 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:339:42 [INFO] [stdout] | [INFO] [stdout] 339 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 340 | ResolvedSymbol::Enum(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tast/src/vtable.rs:12:31 [INFO] [stdout] | [INFO] [stdout] 12 | write!(f, "{}", self.0.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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:73:27 [INFO] [stdout] | [INFO] [stdout] 73 | let loc = self.peek_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.peek_token().loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | / return TypeArgStartDetail { [INFO] [stdout] 271 | | includes_type_args: true, [INFO] [stdout] 272 | | is_array_init: false, [INFO] [stdout] 273 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 270 ~ TypeArgStartDetail { [INFO] [stdout] 271 + includes_type_args: true, [INFO] [stdout] 272 + is_array_init: false, [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:220:77 [INFO] [stdout] | [INFO] [stdout] 220 | ... else if next_token.kind == TokenKind::LeftBrace { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 221 | | ... return TypeArgStartDetail { [INFO] [stdout] 222 | | ... includes_type_args: true, // yes, there were type arguments before the braces [INFO] [stdout] 223 | | ... is_array_init: false, // not an array initialization - it's struct initialization [INFO] [stdout] 224 | | ... }; [INFO] [stdout] 225 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:231:77 [INFO] [stdout] | [INFO] [stdout] 231 | ... else if next_token.kind == TokenKind::LeftParen { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 232 | | ... return TypeArgStartDetail { [INFO] [stdout] 233 | | ... includes_type_args: true, // Yes, there were type arguments before the parens [INFO] [stdout] 234 | | ... is_array_init: false, // Not an array initialization - it's either tuple [INFO] [stdout] 235 | | ... // struct init or function call with generics [INFO] [stdout] 236 | | ... }; [INFO] [stdout] 237 | | ... } [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / if let TokenKind::Literal(literal) = &token.kind { [INFO] [stdout] 433 | | if let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | | if suffix.is_none() { [INFO] [stdout] 435 | | return Ok(*value); [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if let TokenKind::Literal(literal) = &token.kind [INFO] [stdout] 433 ~ && let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | if suffix.is_none() { [INFO] [stdout] 435 | return Ok(*value); [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:433:13 [INFO] [stdout] | [INFO] [stdout] 433 | / if let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | | if suffix.is_none() { [INFO] [stdout] 435 | | return Ok(*value); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 433 ~ if let LiteralKind::Integer(value, suffix) = &literal.kind [INFO] [stdout] 434 ~ && suffix.is_none() { [INFO] [stdout] 435 | return Ok(*value); [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:446:9 [INFO] [stdout] | [INFO] [stdout] 446 | / if let TokenKind::Literal(literal) = &token.kind { [INFO] [stdout] 447 | | if let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | | if prefix.is_none() { [INFO] [stdout] 449 | | return Ok(value.clone()); [INFO] [stdout] ... | [INFO] [stdout] 452 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 446 ~ if let TokenKind::Literal(literal) = &token.kind [INFO] [stdout] 447 ~ && let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | if prefix.is_none() { [INFO] [stdout] 449 | return Ok(value.clone()); [INFO] [stdout] 450 | } [INFO] [stdout] 451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:447:13 [INFO] [stdout] | [INFO] [stdout] 447 | / if let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | | if prefix.is_none() { [INFO] [stdout] 449 | | return Ok(value.clone()); [INFO] [stdout] 450 | | } [INFO] [stdout] 451 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if let LiteralKind::String(value, prefix) = &literal.kind [INFO] [stdout] 448 ~ && prefix.is_none() { [INFO] [stdout] 449 | return Ok(value.clone()); [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:501:19 [INFO] [stdout] | [INFO] [stdout] 501 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:519:19 [INFO] [stdout] | [INFO] [stdout] 519 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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] --> crates/cyrusc_parser/src/common.rs:560:56 [INFO] [stdout] | [INFO] [stdout] 560 | ref token_kind if PRIMITIVE_TYPES.contains(&token_kind) => Ok(TypeSpecifier::TypeToken(token)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `token_kind` [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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:579:34 [INFO] [stdout] | [INFO] [stdout] 579 | ... loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:591:34 [INFO] [stdout] | [INFO] [stdout] 591 | ... loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:646:19 [INFO] [stdout] | [INFO] [stdout] 646 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:673:31 [INFO] [stdout] | [INFO] [stdout] 673 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:713:19 [INFO] [stdout] | [INFO] [stdout] 713 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:730:31 [INFO] [stdout] | [INFO] [stdout] 730 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:793:27 [INFO] [stdout] | [INFO] [stdout] 793 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:821:19 [INFO] [stdout] | [INFO] [stdout] 821 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:113:50 [INFO] [stdout] | [INFO] [stdout] 113 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:125:50 [INFO] [stdout] | [INFO] [stdout] 125 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:137:50 [INFO] [stdout] | [INFO] [stdout] 137 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:149:50 [INFO] [stdout] | [INFO] [stdout] 149 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:160:50 [INFO] [stdout] | [INFO] [stdout] 160 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:171:50 [INFO] [stdout] | [INFO] [stdout] 171 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:117:26 [INFO] [stdout] | [INFO] [stdout] 117 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:130:22 [INFO] [stdout] | [INFO] [stdout] 130 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:149:30 [INFO] [stdout] | [INFO] [stdout] 149 | loc: ident_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:172:18 [INFO] [stdout] | [INFO] [stdout] 172 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:179:25 [INFO] [stdout] | [INFO] [stdout] 179 | let start_loc = start_token.loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:367:17 [INFO] [stdout] | [INFO] [stdout] 367 | return Err(self.error_invalid_token()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 367 - return Err(self.error_invalid_token()); [INFO] [stdout] 367 + Err(self.error_invalid_token()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:370:13 [INFO] [stdout] | [INFO] [stdout] 370 | return self.parse_func_call(expr, type_args_opt); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 370 - return self.parse_func_call(expr, type_args_opt); [INFO] [stdout] 370 + self.parse_func_call(expr, type_args_opt) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:217:19 [INFO] [stdout] | [INFO] [stdout] 217 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:262:27 [INFO] [stdout] | [INFO] [stdout] 262 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:272:27 [INFO] [stdout] | [INFO] [stdout] 272 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:283:22 [INFO] [stdout] | [INFO] [stdout] 283 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:295:26 [INFO] [stdout] | [INFO] [stdout] 295 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:315:26 [INFO] [stdout] | [INFO] [stdout] 315 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:356:24 [INFO] [stdout] | [INFO] [stdout] 356 | return Ok(self.parse_array(type_specifier)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 356 - return Ok(self.parse_array(type_specifier)?); [INFO] [stdout] 356 + return self.parse_array(type_specifier); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:383:19 [INFO] [stdout] | [INFO] [stdout] 383 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:411:19 [INFO] [stdout] | [INFO] [stdout] 411 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:425:19 [INFO] [stdout] | [INFO] [stdout] 425 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:455:19 [INFO] [stdout] | [INFO] [stdout] 455 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:505:19 [INFO] [stdout] | [INFO] [stdout] 505 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | / if let (Some(token1), Some(token2)) = (self.peek_n_token(1), self.peek_n_token(2)) { [INFO] [stdout] 512 | | if token1.kind == TokenKind::GreaterThan && token2.kind == TokenKind::GreaterThan { [INFO] [stdout] 513 | | let peek_token_idx = self.cur_token_idx + 1; [INFO] [stdout] 514 | | self.tokens.remove(peek_token_idx); [INFO] [stdout] ... | [INFO] [stdout] 525 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 511 ~ if let (Some(token1), Some(token2)) = (self.peek_n_token(1), self.peek_n_token(2)) [INFO] [stdout] 512 ~ && token1.kind == TokenKind::GreaterThan && token2.kind == TokenKind::GreaterThan { [INFO] [stdout] 513 | let peek_token_idx = self.cur_token_idx + 1; [INFO] [stdout] ... [INFO] [stdout] 523 | ); [INFO] [stdout] 524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:521:34 [INFO] [stdout] | [INFO] [stdout] 521 | ... loc: token1.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token1.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:651:19 [INFO] [stdout] | [INFO] [stdout] 651 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:700:19 [INFO] [stdout] | [INFO] [stdout] 700 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:750:19 [INFO] [stdout] | [INFO] [stdout] 750 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:772:19 [INFO] [stdout] | [INFO] [stdout] 772 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:794:29 [INFO] [stdout] | [INFO] [stdout] 794 | let field_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:869:19 [INFO] [stdout] | [INFO] [stdout] 869 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:884:19 [INFO] [stdout] | [INFO] [stdout] 884 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:894:18 [INFO] [stdout] | [INFO] [stdout] 894 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:909:22 [INFO] [stdout] | [INFO] [stdout] 909 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:955:19 [INFO] [stdout] | [INFO] [stdout] 955 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:968:19 [INFO] [stdout] | [INFO] [stdout] 968 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:985:22 [INFO] [stdout] | [INFO] [stdout] 985 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1019:34 [INFO] [stdout] | [INFO] [stdout] 1019 | ... loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1027:30 [INFO] [stdout] | [INFO] [stdout] 1027 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1088:31 [INFO] [stdout] | [INFO] [stdout] 1088 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1144:18 [INFO] [stdout] | [INFO] [stdout] 1144 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1165:13 [INFO] [stdout] | [INFO] [stdout] 1165 | / return Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1166 | | field_name: ident, [INFO] [stdout] 1167 | | field_value: Box::new(ident_expr), [INFO] [stdout] 1168 | | is_const, [INFO] [stdout] 1169 | | loc: self.current_token().loc.clone(), [INFO] [stdout] 1170 | | span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1171 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1165 ~ Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1166 + field_name: ident, [INFO] [stdout] 1167 + field_value: Box::new(ident_expr), [INFO] [stdout] 1168 + is_const, [INFO] [stdout] 1169 + loc: self.current_token().loc.clone(), [INFO] [stdout] 1170 + span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1171 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1179:13 [INFO] [stdout] | [INFO] [stdout] 1179 | / return Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1180 | | field_name: ident, [INFO] [stdout] 1181 | | field_value: Box::new(field_value), [INFO] [stdout] 1182 | | is_const, [INFO] [stdout] 1183 | | loc: self.current_token().loc.clone(), [INFO] [stdout] 1184 | | span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1185 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1179 ~ Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1180 + field_name: ident, [INFO] [stdout] 1181 + field_value: Box::new(field_value), [INFO] [stdout] 1182 + is_const, [INFO] [stdout] 1183 + loc: self.current_token().loc.clone(), [INFO] [stdout] 1184 + span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1185 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1169:22 [INFO] [stdout] | [INFO] [stdout] 1169 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1183:22 [INFO] [stdout] | [INFO] [stdout] 1183 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:295:21 [INFO] [stdout] | [INFO] [stdout] 295 | return Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 295 - return Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))); [INFO] [stdout] 295 + Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:391:23 [INFO] [stdout] | [INFO] [stdout] 391 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:444:23 [INFO] [stdout] | [INFO] [stdout] 444 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:482:23 [INFO] [stdout] | [INFO] [stdout] 482 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:518:23 [INFO] [stdout] | [INFO] [stdout] 518 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:555:23 [INFO] [stdout] | [INFO] [stdout] 555 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(self.error_invalid_token()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return Err(self.error_invalid_token()); [INFO] [stdout] 116 + Err(self.error_invalid_token()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:41:19 [INFO] [stdout] | [INFO] [stdout] 41 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:161:19 [INFO] [stdout] | [INFO] [stdout] 161 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:178:19 [INFO] [stdout] | [INFO] [stdout] 178 | let loc = name.loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:190:19 [INFO] [stdout] | [INFO] [stdout] 190 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:273:30 [INFO] [stdout] | [INFO] [stdout] 273 | loc: token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:278:37 [INFO] [stdout] | [INFO] [stdout] 278 | let param_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:380:27 [INFO] [stdout] | [INFO] [stdout] 380 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:405:19 [INFO] [stdout] | [INFO] [stdout] 405 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:432:19 [INFO] [stdout] | [INFO] [stdout] 432 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 441 ~ [INFO] [stdout] 442 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 443 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 444 | } else { [INFO] [stdout] 445 ~ None [INFO] [stdout] 446 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:490:31 [INFO] [stdout] | [INFO] [stdout] 490 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:522:19 [INFO] [stdout] | [INFO] [stdout] 522 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:532:9 [INFO] [stdout] | [INFO] [stdout] 532 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 532 ~ [INFO] [stdout] 533 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 534 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 535 | } else { [INFO] [stdout] 536 ~ None [INFO] [stdout] 537 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:605:31 [INFO] [stdout] | [INFO] [stdout] 605 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:666:19 [INFO] [stdout] | [INFO] [stdout] 666 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:667:28 [INFO] [stdout] | [INFO] [stdout] 667 | let struct_start = self.current_token().span.start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().span.start` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:676:9 [INFO] [stdout] | [INFO] [stdout] 676 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 676 ~ [INFO] [stdout] 677 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 678 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 679 | } else { [INFO] [stdout] 680 ~ None [INFO] [stdout] 681 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:712:31 [INFO] [stdout] | [INFO] [stdout] 712 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:753:19 [INFO] [stdout] | [INFO] [stdout] 753 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:780:19 [INFO] [stdout] | [INFO] [stdout] 780 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:794:19 [INFO] [stdout] | [INFO] [stdout] 794 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:846:19 [INFO] [stdout] | [INFO] [stdout] 846 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 loop could be written as a `while let` loop [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:874:9 [INFO] [stdout] | [INFO] [stdout] 874 | / loop { [INFO] [stdout] 875 | | match self.current_token().kind { [INFO] [stdout] 876 | | TokenKind::Function => { [INFO] [stdout] 877 | | let func_decl = match self.parse_func(FuncModifiers::default())? { [INFO] [stdout] ... | [INFO] [stdout] 894 | | } [INFO] [stdout] | |_________^ help: try: `while let TokenKind::Function = self.current_token().kind { .. }` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:950:9 [INFO] [stdout] | [INFO] [stdout] 950 | / return Ok(Stmt::Import(Import { [INFO] [stdout] 951 | | paths, [INFO] [stdout] 952 | | span: Span { [INFO] [stdout] 953 | | start, [INFO] [stdout] ... | [INFO] [stdout] 956 | | loc, [INFO] [stdout] 957 | | })); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 950 ~ Ok(Stmt::Import(Import { [INFO] [stdout] 951 + paths, [INFO] [stdout] 952 + span: Span { [INFO] [stdout] 953 + start, [INFO] [stdout] 954 + end: self.current_token().span.end, [INFO] [stdout] 955 + }, [INFO] [stdout] 956 + loc, [INFO] [stdout] 957 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:910:19 [INFO] [stdout] | [INFO] [stdout] 910 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:976:19 [INFO] [stdout] | [INFO] [stdout] 976 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1013:19 [INFO] [stdout] | [INFO] [stdout] 1013 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1033:19 [INFO] [stdout] | [INFO] [stdout] 1033 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1066:9 [INFO] [stdout] | [INFO] [stdout] 1066 | / if !self.current_token_is(TokenKind::Semicolon) { [INFO] [stdout] 1067 | | if let Stmt::Variable(var) = self.parse_variable()? { [INFO] [stdout] 1068 | | initializer = Some(var); [INFO] [stdout] 1069 | | } [INFO] [stdout] 1070 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1066 ~ if !self.current_token_is(TokenKind::Semicolon) [INFO] [stdout] 1067 ~ && let Stmt::Variable(var) = self.parse_variable()? { [INFO] [stdout] 1068 | initializer = Some(var); [INFO] [stdout] 1069 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1164:19 [INFO] [stdout] | [INFO] [stdout] 1164 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1247:19 [INFO] [stdout] | [INFO] [stdout] 1247 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1249:9 [INFO] [stdout] | [INFO] [stdout] 1249 | let is_const; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `is_const` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1249 ~ [INFO] [stdout] 1250 ~ let is_const = if self.current_token_is(TokenKind::Const) { [INFO] [stdout] 1251 | self.next_token(); [INFO] [stdout] 1252 ~ true [INFO] [stdout] 1253 | } else { [INFO] [stdout] 1254 | self.expect_current(TokenKind::Var)?; [INFO] [stdout] 1255 ~ false [INFO] [stdout] 1256 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1416:9 [INFO] [stdout] | [INFO] [stdout] 1416 | / return Ok(Stmt::FuncDef(FuncDef { [INFO] [stdout] 1417 | | ident: func_name, [INFO] [stdout] 1418 | | generic_params, [INFO] [stdout] 1419 | | params, [INFO] [stdout] ... | [INFO] [stdout] 1424 | | loc, [INFO] [stdout] 1425 | | })); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1416 ~ Ok(Stmt::FuncDef(FuncDef { [INFO] [stdout] 1417 + ident: func_name, [INFO] [stdout] 1418 + generic_params, [INFO] [stdout] 1419 + params, [INFO] [stdout] 1420 + body, [INFO] [stdout] 1421 + return_type, [INFO] [stdout] 1422 + modifiers, [INFO] [stdout] 1423 + span: Span { start, end }, [INFO] [stdout] 1424 + loc, [INFO] [stdout] 1425 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1311:19 [INFO] [stdout] | [INFO] [stdout] 1311 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1430:19 [INFO] [stdout] | [INFO] [stdout] 1430 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1457:19 [INFO] [stdout] | [INFO] [stdout] 1457 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1460:9 [INFO] [stdout] | [INFO] [stdout] 1460 | let is_const; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `is_const` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1460 ~ [INFO] [stdout] 1461 ~ let is_const = if self.current_token_is(TokenKind::Const) { [INFO] [stdout] 1462 | self.next_token(); [INFO] [stdout] 1463 ~ true [INFO] [stdout] 1464 | } else { [INFO] [stdout] 1465 | self.expect_current(TokenKind::Var)?; [INFO] [stdout] 1466 ~ false [INFO] [stdout] 1467 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1470:69 [INFO] [stdout] | [INFO] [stdout] 1470 | modifiers.into_global_var_modifiers(SourceLoc::from_loc(loc.clone(), self.file_name.clone()))?; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1510:9 [INFO] [stdout] | [INFO] [stdout] 1510 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1510 ~ [INFO] [stdout] 1511 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 1512 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 1513 | } else { [INFO] [stdout] 1514 ~ None [INFO] [stdout] 1515 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1519:19 [INFO] [stdout] | [INFO] [stdout] 1519 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1536:19 [INFO] [stdout] | [INFO] [stdout] 1536 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1574:27 [INFO] [stdout] | [INFO] [stdout] 1574 | let loc = this.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1616:32 [INFO] [stdout] | [INFO] [stdout] 1616 | let case_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1669:19 [INFO] [stdout] | [INFO] [stdout] 1669 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1716:26 [INFO] [stdout] | [INFO] [stdout] 1716 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> crates/cyrusc_parser/src/lib.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | / if token_kind == TokenKind::EOF { [INFO] [stdout] 142 | | return true; [INFO] [stdout] 143 | | } else { [INFO] [stdout] 144 | | return false; [INFO] [stdout] 145 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `return token_kind == TokenKind::EOF` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> crates/cyrusc_parser/src/lib.rs:156:17 [INFO] [stdout] | [INFO] [stdout] 156 | / if token_kind == TokenKind::EOF { [INFO] [stdout] 157 | | return true; [INFO] [stdout] 158 | | } else { [INFO] [stdout] 159 | | return false; [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `return token_kind == TokenKind::EOF` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cyrusc_modulefsloader v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_modulefsloader) [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:75:57 [INFO] [stdout] | [INFO] [stdout] 75 | loaded_modules_list.push(Err((diag, sub_import.loc.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | sub_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | sub_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:75:57 [INFO] [stdout] | [INFO] [stdout] 75 | loaded_modules_list.push(Err((diag, sub_import.loc.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | sub_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_modulefsloader/src/lib.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | sub_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_import.loc` [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] [stderr] Checking clap v4.5.53 [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/exprs.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / pub enum TypedExprKind { [INFO] [stdout] 48 | | Symbol(SymbolID, SourceLoc), [INFO] [stdout] 49 | | Literal(TypedLiteralExpr), [INFO] [stdout] 50 | | Prefix(TypedPrefixExpr), [INFO] [stdout] ... | [INFO] [stdout] 64 | | MethodCall(TypedMethodCall), [INFO] [stdout] | | --------------------------- the largest variant contains at least 1360 bytes [INFO] [stdout] ... | [INFO] [stdout] 67 | | Lambda(TypedLambdaExpr), [INFO] [stdout] | | ----------------------- the second-largest variant contains at least 392 bytes [INFO] [stdout] ... | [INFO] [stdout] 71 | | SemanticType(SemanticType), [INFO] [stdout] 72 | | } [INFO] [stdout] | |_^ the entire enum is at least 1360 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] 64 - MethodCall(TypedMethodCall), [INFO] [stdout] 64 + MethodCall(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/exprs.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match self { [INFO] [stdout] 144 | | TypedExprKind::Dynamic(_) => true, [INFO] [stdout] 145 | | _ => false, [INFO] [stdout] 146 | | } [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] 143 - match self { [INFO] [stdout] 144 - TypedExprKind::Dynamic(_) => true, [INFO] [stdout] 145 - _ => false, [INFO] [stdout] 146 - } [INFO] [stdout] 143 + matches!(self, TypedExprKind::Dynamic(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:73:27 [INFO] [stdout] | [INFO] [stdout] 73 | let loc = self.peek_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.peek_token().loc` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:29:38 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn format_typed_exprs<'a>(exprs: &Vec, format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn format_typed_exprs<'a>(exprs: &Vec, format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] 29 + pub fn format_typed_exprs<'a>(exprs: &[TypedExprStmt], format_symbol: &(dyn Fn(SymbolID) -> String + 'a)) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | return "true".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 72 - return "true".to_string(); [INFO] [stdout] 72 + "true".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:74:21 [INFO] [stdout] | [INFO] [stdout] 74 | return "false".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return "false".to_string(); [INFO] [stdout] 74 + "false".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | / return TypeArgStartDetail { [INFO] [stdout] 271 | | includes_type_args: true, [INFO] [stdout] 272 | | is_array_init: false, [INFO] [stdout] 273 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 270 ~ TypeArgStartDetail { [INFO] [stdout] 271 + includes_type_args: true, [INFO] [stdout] 272 + is_array_init: false, [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:62:44 [INFO] [stdout] | [INFO] [stdout] 62 | StringPrefix::C => fmt.push_str("c"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.push('c')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | StringPrefix::B => fmt.push_str("b"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.push('b')` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:220:77 [INFO] [stdout] | [INFO] [stdout] 220 | ... else if next_token.kind == TokenKind::LeftBrace { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 221 | | ... return TypeArgStartDetail { [INFO] [stdout] 222 | | ... includes_type_args: true, // yes, there were type arguments before the braces [INFO] [stdout] 223 | | ... is_array_init: false, // not an array initialization - it's struct initialization [INFO] [stdout] 224 | | ... }; [INFO] [stdout] 225 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:231:77 [INFO] [stdout] | [INFO] [stdout] 231 | ... else if next_token.kind == TokenKind::LeftParen { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 232 | | ... return TypeArgStartDetail { [INFO] [stdout] 233 | | ... includes_type_args: true, // Yes, there were type arguments before the parens [INFO] [stdout] 234 | | ... is_array_init: false, // Not an array initialization - it's either tuple [INFO] [stdout] 235 | | ... // struct init or function call with generics [INFO] [stdout] 236 | | ... }; [INFO] [stdout] 237 | | ... } [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | AssignKind::Default => fmt.push_str("="), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:130:34 [INFO] [stdout] | [INFO] [stdout] 130 | let array_type_fmt = typed_array [INFO] [stdout] | __________________________________^ [INFO] [stdout] 131 | | .array_type [INFO] [stdout] 132 | | .as_ref() [INFO] [stdout] 133 | | .and_then(|sema_ty| Some(format_sema_ty(sema_ty.clone(), format_symbol))) [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 130 ~ let array_type_fmt = typed_array [INFO] [stdout] 131 + .array_type [INFO] [stdout] 132 + .as_ref().map(|sema_ty| format_sema_ty(sema_ty.clone(), format_symbol)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | fmt.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | fmt.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / if let TokenKind::Literal(literal) = &token.kind { [INFO] [stdout] 433 | | if let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | | if suffix.is_none() { [INFO] [stdout] 435 | | return Ok(*value); [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if let TokenKind::Literal(literal) = &token.kind [INFO] [stdout] 433 ~ && let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | if suffix.is_none() { [INFO] [stdout] 435 | return Ok(*value); [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:372:47 [INFO] [stdout] | [INFO] [stdout] 372 | SemanticType::UnresolvedSymbol(..) => format!("UNKNOWN"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"UNKNOWN".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: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:433:13 [INFO] [stdout] | [INFO] [stdout] 433 | / if let LiteralKind::Integer(value, suffix) = &literal.kind { [INFO] [stdout] 434 | | if suffix.is_none() { [INFO] [stdout] 435 | | return Ok(*value); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 433 ~ if let LiteralKind::Integer(value, suffix) = &literal.kind [INFO] [stdout] 434 ~ && suffix.is_none() { [INFO] [stdout] 435 | return Ok(*value); [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | fmt.push_str("["); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/cyrusc_tast/src/format.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | fmt.push_str("]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `fmt.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:446:9 [INFO] [stdout] | [INFO] [stdout] 446 | / if let TokenKind::Literal(literal) = &token.kind { [INFO] [stdout] 447 | | if let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | | if prefix.is_none() { [INFO] [stdout] 449 | | return Ok(value.clone()); [INFO] [stdout] ... | [INFO] [stdout] 452 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 446 ~ if let TokenKind::Literal(literal) = &token.kind [INFO] [stdout] 447 ~ && let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | if prefix.is_none() { [INFO] [stdout] 449 | return Ok(value.clone()); [INFO] [stdout] 450 | } [INFO] [stdout] 451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:447:13 [INFO] [stdout] | [INFO] [stdout] 447 | / if let LiteralKind::String(value, prefix) = &literal.kind { [INFO] [stdout] 448 | | if prefix.is_none() { [INFO] [stdout] 449 | | return Ok(value.clone()); [INFO] [stdout] 450 | | } [INFO] [stdout] 451 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if let LiteralKind::String(value, prefix) = &literal.kind [INFO] [stdout] 448 ~ && prefix.is_none() { [INFO] [stdout] 449 | return Ok(value.clone()); [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | debug_assert!(generic_params.list.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!generic_params.list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:77:23 [INFO] [stdout] | [INFO] [stdout] 77 | debug_assert!(self.generic_params.list.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.generic_params.list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `generics::mapping_ctx::GenericMappingEntry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:142:46 [INFO] [stdout] | [INFO] [stdout] 142 | mapping_ctx.insert_named(GenericMappingEntry::from(typed_identifier), ty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `GenericMappingEntry::from()`: `typed_identifier` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / if mapping_ctx [INFO] [stdout] 162 | | .resolve_with_name(mapping_ctx_arena.clone(), &generic_param.param_name.name) [INFO] [stdout] 163 | | .is_none() [INFO] [stdout] ... | [INFO] [stdout] 171 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ .is_none() [INFO] [stdout] 164 ~ && let Some(default) = &generic_param.default { [INFO] [stdout] 165 | mapping_ctx.insert_named( [INFO] [stdout] ... [INFO] [stdout] 168 | ); [INFO] [stdout] 169 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:280:16 [INFO] [stdout] | [INFO] [stdout] 280 | if collected_type_args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!collected_type_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:501:19 [INFO] [stdout] | [INFO] [stdout] 501 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:519:19 [INFO] [stdout] | [INFO] [stdout] 519 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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] --> crates/cyrusc_parser/src/common.rs:560:56 [INFO] [stdout] | [INFO] [stdout] 560 | ref token_kind if PRIMITIVE_TYPES.contains(&token_kind) => Ok(TypeSpecifier::TypeToken(token)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `token_kind` [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: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 426 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/generic_type.rs:435:5 [INFO] [stdout] | [INFO] [stdout] 435 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:579:34 [INFO] [stdout] | [INFO] [stdout] 579 | ... loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:76:19 [INFO] [stdout] | [INFO] [stdout] 76 | debug_assert!(final_generic_params.is_empty() == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!final_generic_params.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:133:43 [INFO] [stdout] | [INFO] [stdout] 133 | current_generic_mapping_ctx = inner_mapping_ctx [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 134 | | .parent [INFO] [stdout] 135 | | .and_then(|parent_id| Some(mapping_ctx_arena.get(parent_id).unwrap())) [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 133 ~ current_generic_mapping_ctx = inner_mapping_ctx [INFO] [stdout] 134 + .parent.map(|parent_id| mapping_ctx_arena.get(parent_id).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:591:34 [INFO] [stdout] | [INFO] [stdout] 591 | ... loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | / if !self.named.contains_key(&entry) { [INFO] [stdout] 202 | | self.named.insert(entry, ty); [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ help: try: `self.named.entry(entry).or_insert(ty);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GenericTemplateRegistry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/monomorph.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn new() -> Self { [INFO] [stdout] 57 | | Self { map: HashMap::new() } [INFO] [stdout] 58 | | } [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] 55 + impl Default for GenericTemplateRegistry { [INFO] [stdout] 56 + fn default() -> Self { [INFO] [stdout] 57 + Self::new() [INFO] [stdout] 58 + } [INFO] [stdout] 59 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MonomorphRegistry` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/monomorph.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | / pub fn new() -> Self { [INFO] [stdout] 118 | | Self { [INFO] [stdout] 119 | | next_id: 1, [INFO] [stdout] 120 | | map: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 124 | | } [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] 116 + impl Default for MonomorphRegistry { [INFO] [stdout] 117 + fn default() -> Self { [INFO] [stdout] 118 + Self::new() [INFO] [stdout] 119 + } [INFO] [stdout] 120 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:646:19 [INFO] [stdout] | [INFO] [stdout] 646 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:673:31 [INFO] [stdout] | [INFO] [stdout] 673 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/substitute.rs:169:20 [INFO] [stdout] | [INFO] [stdout] 169 | let variadic = func_params.variadic.clone().and_then(|variadic| match &variadic { [INFO] [stdout] | ____________________^ [INFO] [stdout] 170 | | unsubstituted_variadic_param @ TypedFuncVariadicParams::Typed(ident, sema_ty) => { [INFO] [stdout] 171 | | if let Some(sema_ty) = substitute_type(mapping_ctx_arena, sema_ty.clone(), ctx.clone()) { [INFO] [stdout] 172 | | Some(TypedFuncVariadicParams::Typed(ident.clone(), sema_ty)) [INFO] [stdout] ... | [INFO] [stdout] 177 | | c_style_variadic @ TypedFuncVariadicParams::UntypedCStyle => Some(c_style_variadic.clone()), [INFO] [stdout] 178 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 169 ~ let variadic = func_params.variadic.clone().map(|variadic| match &variadic { [INFO] [stdout] 170 | unsubstituted_variadic_param @ TypedFuncVariadicParams::Typed(ident, sema_ty) => { [INFO] [stdout] 171 | if let Some(sema_ty) = substitute_type(mapping_ctx_arena, sema_ty.clone(), ctx.clone()) { [INFO] [stdout] 172 ~ TypedFuncVariadicParams::Typed(ident.clone(), sema_ty) [INFO] [stdout] 173 | } else { [INFO] [stdout] 174 ~ unsubstituted_variadic_param.clone() [INFO] [stdout] 175 | } [INFO] [stdout] 176 | } [INFO] [stdout] 177 ~ c_style_variadic @ TypedFuncVariadicParams::UntypedCStyle => c_style_variadic.clone(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:713:19 [INFO] [stdout] | [INFO] [stdout] 713 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:730:31 [INFO] [stdout] | [INFO] [stdout] 730 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:793:27 [INFO] [stdout] | [INFO] [stdout] 793 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/common.rs:821:19 [INFO] [stdout] | [INFO] [stdout] 821 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `GenericMappingCtxArenaImpl` [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx_arena.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { 0: Vec::new() } [INFO] [stdout] 15 | | } [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] 12 + impl Default for GenericMappingCtxArenaImpl { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> crates/cyrusc_tast/src/generics/mapping_ctx_arena.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | Self { 0: Vec::new() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `Self(Vec::new())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:143:18 [INFO] [stdout] | [INFO] [stdout] 143 | .map(|func_decl| typed_func_decl_as_func_sig(func_decl)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `typed_func_decl_as_func_sig` [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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:113:50 [INFO] [stdout] | [INFO] [stdout] 113 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Some(func_param_kind) = first_param { [INFO] [stdout] 153 | | if let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 154 | | match self_modifier.kind { [INFO] [stdout] 155 | | SelfModifierKind::Copied => { [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 152 ~ if let Some(func_param_kind) = first_param [INFO] [stdout] 153 ~ && let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 154 | match self_modifier.kind { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:125:50 [INFO] [stdout] | [INFO] [stdout] 125 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:137:50 [INFO] [stdout] | [INFO] [stdout] 137 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_tast/src/sigs.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Some(func_param_kind) = first_param { [INFO] [stdout] 170 | | if let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 171 | | self_modifier.self_symbol_id = Some(symbol_id); [INFO] [stdout] 172 | | } [INFO] [stdout] 173 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Some(func_param_kind) = first_param [INFO] [stdout] 170 ~ && let Some(self_modifier) = func_param_kind.as_self_modifier_mut() { [INFO] [stdout] 171 | self_modifier.self_symbol_id = Some(symbol_id); [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:149:50 [INFO] [stdout] | [INFO] [stdout] 149 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:160:50 [INFO] [stdout] | [INFO] [stdout] 160 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/diagnostics.rs:171:50 [INFO] [stdout] | [INFO] [stdout] 171 | DiagLoc::new(SourceLoc::from_loc(token.loc.clone(), self.file_name.clone())).span(token.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / pub enum TypedStmt { [INFO] [stdout] 32 | | Variable(TypedVarStmt), [INFO] [stdout] 33 | | Typedef(TypedTypedefStmt), [INFO] [stdout] 34 | | GlobalVar(TypedGlobalVarStmt), [INFO] [stdout] | | ----------------------------- the second-largest variant contains at least 1824 bytes [INFO] [stdout] ... | [INFO] [stdout] 42 | | For(TypedForStmt), [INFO] [stdout] | | ----------------- the largest variant contains at least 4848 bytes [INFO] [stdout] ... | [INFO] [stdout] 53 | | Goto(TypedGotoStmt), [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ the entire enum is at least 4848 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] 42 - For(TypedForStmt), [INFO] [stdout] 42 + For(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:117:26 [INFO] [stdout] | [INFO] [stdout] 117 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:130:22 [INFO] [stdout] | [INFO] [stdout] 130 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:149:30 [INFO] [stdout] | [INFO] [stdout] 149 | loc: ident_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:172:18 [INFO] [stdout] | [INFO] [stdout] 172 | loc: start_token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:179:25 [INFO] [stdout] | [INFO] [stdout] 179 | let start_loc = start_token.loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_token.loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:367:17 [INFO] [stdout] | [INFO] [stdout] 367 | return Err(self.error_invalid_token()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 367 - return Err(self.error_invalid_token()); [INFO] [stdout] 367 + Err(self.error_invalid_token()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:370:13 [INFO] [stdout] | [INFO] [stdout] 370 | return self.parse_func_call(expr, type_args_opt); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 370 - return self.parse_func_call(expr, type_args_opt); [INFO] [stdout] 370 + self.parse_func_call(expr, type_args_opt) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:217:19 [INFO] [stdout] | [INFO] [stdout] 217 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:262:27 [INFO] [stdout] | [INFO] [stdout] 262 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:272:27 [INFO] [stdout] | [INFO] [stdout] 272 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:283:22 [INFO] [stdout] | [INFO] [stdout] 283 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:295:26 [INFO] [stdout] | [INFO] [stdout] 295 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:315:26 [INFO] [stdout] | [INFO] [stdout] 315 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:356:24 [INFO] [stdout] | [INFO] [stdout] 356 | return Ok(self.parse_array(type_specifier)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 356 - return Ok(self.parse_array(type_specifier)?); [INFO] [stdout] 356 + return self.parse_array(type_specifier); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:383:19 [INFO] [stdout] | [INFO] [stdout] 383 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:411:19 [INFO] [stdout] | [INFO] [stdout] 411 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:425:19 [INFO] [stdout] | [INFO] [stdout] 425 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:455:19 [INFO] [stdout] | [INFO] [stdout] 455 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:505:19 [INFO] [stdout] | [INFO] [stdout] 505 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | / if let (Some(token1), Some(token2)) = (self.peek_n_token(1), self.peek_n_token(2)) { [INFO] [stdout] 512 | | if token1.kind == TokenKind::GreaterThan && token2.kind == TokenKind::GreaterThan { [INFO] [stdout] 513 | | let peek_token_idx = self.cur_token_idx + 1; [INFO] [stdout] 514 | | self.tokens.remove(peek_token_idx); [INFO] [stdout] ... | [INFO] [stdout] 525 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 511 ~ if let (Some(token1), Some(token2)) = (self.peek_n_token(1), self.peek_n_token(2)) [INFO] [stdout] 512 ~ && token1.kind == TokenKind::GreaterThan && token2.kind == TokenKind::GreaterThan { [INFO] [stdout] 513 | let peek_token_idx = self.cur_token_idx + 1; [INFO] [stdout] ... [INFO] [stdout] 523 | ); [INFO] [stdout] 524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:521:34 [INFO] [stdout] | [INFO] [stdout] 521 | ... loc: token1.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token1.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:651:19 [INFO] [stdout] | [INFO] [stdout] 651 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:700:19 [INFO] [stdout] | [INFO] [stdout] 700 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:750:19 [INFO] [stdout] | [INFO] [stdout] 750 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:772:19 [INFO] [stdout] | [INFO] [stdout] 772 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:794:29 [INFO] [stdout] | [INFO] [stdout] 794 | let field_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:477:1 [INFO] [stdout] | [INFO] [stdout] 477 | / pub enum TypedSwitchCasePattern { [INFO] [stdout] 478 | | Range(TypedRange), [INFO] [stdout] | | ----------------- the largest variant contains at least 3120 bytes [INFO] [stdout] 479 | | Expr(TypedExprStmt, SourceLoc), [INFO] [stdout] | | ------------------------------ the second-largest variant contains at least 1576 bytes [INFO] [stdout] 480 | | Ident(String, SourceLoc), [INFO] [stdout] 481 | | EnumVariant(String, Vec, SourceLoc), [INFO] [stdout] 482 | | } [INFO] [stdout] | |_^ the entire enum is at least 3120 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] 478 - Range(TypedRange), [INFO] [stdout] 478 + Range(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:869:19 [INFO] [stdout] | [INFO] [stdout] 869 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:884:19 [INFO] [stdout] | [INFO] [stdout] 884 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:894:18 [INFO] [stdout] | [INFO] [stdout] 894 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `TypedGenericParamsList` [INFO] [stdout] --> crates/cyrusc_tast/src/stmts.rs:524:5 [INFO] [stdout] | [INFO] [stdout] 524 | / pub fn new() -> Self { [INFO] [stdout] 525 | | Self { list: Vec::new() } [INFO] [stdout] 526 | | } [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] 523 + impl Default for TypedGenericParamsList { [INFO] [stdout] 524 + fn default() -> Self { [INFO] [stdout] 525 + Self::new() [INFO] [stdout] 526 + } [INFO] [stdout] 527 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:909:22 [INFO] [stdout] | [INFO] [stdout] 909 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:955:19 [INFO] [stdout] | [INFO] [stdout] 955 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:968:19 [INFO] [stdout] | [INFO] [stdout] 968 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:985:22 [INFO] [stdout] | [INFO] [stdout] 985 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1019:34 [INFO] [stdout] | [INFO] [stdout] 1019 | ... loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1027:30 [INFO] [stdout] | [INFO] [stdout] 1027 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1088:31 [INFO] [stdout] | [INFO] [stdout] 1088 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1144:18 [INFO] [stdout] | [INFO] [stdout] 1144 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1165:13 [INFO] [stdout] | [INFO] [stdout] 1165 | / return Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1166 | | field_name: ident, [INFO] [stdout] 1167 | | field_value: Box::new(ident_expr), [INFO] [stdout] 1168 | | is_const, [INFO] [stdout] 1169 | | loc: self.current_token().loc.clone(), [INFO] [stdout] 1170 | | span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1171 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1165 ~ Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1166 + field_name: ident, [INFO] [stdout] 1167 + field_value: Box::new(ident_expr), [INFO] [stdout] 1168 + is_const, [INFO] [stdout] 1169 + loc: self.current_token().loc.clone(), [INFO] [stdout] 1170 + span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1171 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1179:13 [INFO] [stdout] | [INFO] [stdout] 1179 | / return Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1180 | | field_name: ident, [INFO] [stdout] 1181 | | field_value: Box::new(field_value), [INFO] [stdout] 1182 | | is_const, [INFO] [stdout] 1183 | | loc: self.current_token().loc.clone(), [INFO] [stdout] 1184 | | span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1185 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1179 ~ Ok(Expr::UnnamedUnionValue(UnnamedUnionValue { [INFO] [stdout] 1180 + field_name: ident, [INFO] [stdout] 1181 + field_value: Box::new(field_value), [INFO] [stdout] 1182 + is_const, [INFO] [stdout] 1183 + loc: self.current_token().loc.clone(), [INFO] [stdout] 1184 + span: Span::new(union_start, self.current_token().span.end), [INFO] [stdout] 1185 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1169:22 [INFO] [stdout] | [INFO] [stdout] 1169 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/exprs.rs:1183:22 [INFO] [stdout] | [INFO] [stdout] 1183 | loc: self.current_token().loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / match self.const_inner() { [INFO] [stdout] 178 | | SemanticType::GenericType(_) => true, [INFO] [stdout] 179 | | _ => false, [INFO] [stdout] 180 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 177 - match self.const_inner() { [INFO] [stdout] 178 - SemanticType::GenericType(_) => true, [INFO] [stdout] 179 - _ => false, [INFO] [stdout] 180 - } [INFO] [stdout] 177 + matches!(self.const_inner(), SemanticType::GenericType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | / match self.const_inner() { [INFO] [stdout] 255 | | SemanticType::ResolvedSymbol(..) => true, [INFO] [stdout] 256 | | _ => false, [INFO] [stdout] 257 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 254 - match self.const_inner() { [INFO] [stdout] 255 - SemanticType::ResolvedSymbol(..) => true, [INFO] [stdout] 256 - _ => false, [INFO] [stdout] 257 - } [INFO] [stdout] 254 + matches!(self.const_inner(), SemanticType::ResolvedSymbol(..)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | / match self.const_inner() { [INFO] [stdout] 262 | | SemanticType::PlainType(PlainType::Char) => true, [INFO] [stdout] 263 | | _ => false, [INFO] [stdout] 264 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 261 - match self.const_inner() { [INFO] [stdout] 262 - SemanticType::PlainType(PlainType::Char) => true, [INFO] [stdout] 263 - _ => false, [INFO] [stdout] 264 - } [INFO] [stdout] 261 + matches!(self.const_inner(), SemanticType::PlainType(PlainType::Char)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | / match self.const_inner() { [INFO] [stdout] 269 | | SemanticType::SelfType(_) => true, [INFO] [stdout] 270 | | _ => false, [INFO] [stdout] 271 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 268 - match self.const_inner() { [INFO] [stdout] 269 - SemanticType::SelfType(_) => true, [INFO] [stdout] 270 - _ => false, [INFO] [stdout] 271 - } [INFO] [stdout] 268 + matches!(self.const_inner(), SemanticType::SelfType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:319:62 [INFO] [stdout] | [INFO] [stdout] 319 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 320 | | ResolvedSymbol::Struct(symbol_id) => Some(*symbol_id), [INFO] [stdout] 321 | | _ => None, [INFO] [stdout] 322 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:319:42 [INFO] [stdout] | [INFO] [stdout] 319 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 320 | ResolvedSymbol::Struct(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:329:62 [INFO] [stdout] | [INFO] [stdout] 329 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 330 | | ResolvedSymbol::Union(symbol_id) => Some(*symbol_id), [INFO] [stdout] 331 | | _ => None, [INFO] [stdout] 332 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:329:42 [INFO] [stdout] | [INFO] [stdout] 329 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 330 | ResolvedSymbol::Union(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:339:62 [INFO] [stdout] | [INFO] [stdout] 339 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 340 | | ResolvedSymbol::Enum(symbol_id) => Some(*symbol_id), [INFO] [stdout] 341 | | _ => None, [INFO] [stdout] 342 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/cyrusc_tast/src/types.rs:339:42 [INFO] [stdout] | [INFO] [stdout] 339 | SemanticType::ResolvedSymbol(resolved_symbol) => match resolved_symbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 340 | ResolvedSymbol::Enum(symbol_id) => Some(*symbol_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:295:21 [INFO] [stdout] | [INFO] [stdout] 295 | return Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 295 - return Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))); [INFO] [stdout] 295 + Err(self.error_at_token(&token, ParserDiagKind::InvalidModifier(call_conv_err.to_string()))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:391:23 [INFO] [stdout] | [INFO] [stdout] 391 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:444:23 [INFO] [stdout] | [INFO] [stdout] 444 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:482:23 [INFO] [stdout] | [INFO] [stdout] 482 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:518:23 [INFO] [stdout] | [INFO] [stdout] 518 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.placement.get(0)` [INFO] [stdout] --> crates/cyrusc_parser/src/modifiers.rs:555:23 [INFO] [stdout] | [INFO] [stdout] 555 | let section = self.placement.get(0).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.placement.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `write!` args [INFO] [stdout] --> crates/cyrusc_tast/src/vtable.rs:12:31 [INFO] [stdout] | [INFO] [stdout] 12 | write!(f, "{}", self.0.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: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(self.error_invalid_token()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return Err(self.error_invalid_token()); [INFO] [stdout] 116 + Err(self.error_invalid_token()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:41:19 [INFO] [stdout] | [INFO] [stdout] 41 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:161:19 [INFO] [stdout] | [INFO] [stdout] 161 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:178:19 [INFO] [stdout] | [INFO] [stdout] 178 | let loc = name.loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:190:19 [INFO] [stdout] | [INFO] [stdout] 190 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:273:30 [INFO] [stdout] | [INFO] [stdout] 273 | loc: token.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:278:37 [INFO] [stdout] | [INFO] [stdout] 278 | let param_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:380:27 [INFO] [stdout] | [INFO] [stdout] 380 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:405:19 [INFO] [stdout] | [INFO] [stdout] 405 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:432:19 [INFO] [stdout] | [INFO] [stdout] 432 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 441 ~ [INFO] [stdout] 442 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 443 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 444 | } else { [INFO] [stdout] 445 ~ None [INFO] [stdout] 446 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:490:31 [INFO] [stdout] | [INFO] [stdout] 490 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:522:19 [INFO] [stdout] | [INFO] [stdout] 522 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:532:9 [INFO] [stdout] | [INFO] [stdout] 532 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 532 ~ [INFO] [stdout] 533 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 534 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 535 | } else { [INFO] [stdout] 536 ~ None [INFO] [stdout] 537 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:605:31 [INFO] [stdout] | [INFO] [stdout] 605 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:666:19 [INFO] [stdout] | [INFO] [stdout] 666 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:667:28 [INFO] [stdout] | [INFO] [stdout] 667 | let struct_start = self.current_token().span.start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().span.start` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:676:9 [INFO] [stdout] | [INFO] [stdout] 676 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 676 ~ [INFO] [stdout] 677 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 678 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 679 | } else { [INFO] [stdout] 680 ~ None [INFO] [stdout] 681 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:712:31 [INFO] [stdout] | [INFO] [stdout] 712 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:753:19 [INFO] [stdout] | [INFO] [stdout] 753 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:780:19 [INFO] [stdout] | [INFO] [stdout] 780 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:794:19 [INFO] [stdout] | [INFO] [stdout] 794 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:846:19 [INFO] [stdout] | [INFO] [stdout] 846 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 loop could be written as a `while let` loop [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:874:9 [INFO] [stdout] | [INFO] [stdout] 874 | / loop { [INFO] [stdout] 875 | | match self.current_token().kind { [INFO] [stdout] 876 | | TokenKind::Function => { [INFO] [stdout] 877 | | let func_decl = match self.parse_func(FuncModifiers::default())? { [INFO] [stdout] ... | [INFO] [stdout] 894 | | } [INFO] [stdout] | |_________^ help: try: `while let TokenKind::Function = self.current_token().kind { .. }` [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] [stderr] Checking cyrusc_resolver v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_resolver) [INFO] [stderr] Checking cyrusc_vtable_registry v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_vtable_registry) [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:950:9 [INFO] [stdout] | [INFO] [stdout] 950 | / return Ok(Stmt::Import(Import { [INFO] [stdout] 951 | | paths, [INFO] [stdout] 952 | | span: Span { [INFO] [stdout] 953 | | start, [INFO] [stdout] ... | [INFO] [stdout] 956 | | loc, [INFO] [stdout] 957 | | })); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 950 ~ Ok(Stmt::Import(Import { [INFO] [stdout] 951 + paths, [INFO] [stdout] 952 + span: Span { [INFO] [stdout] 953 + start, [INFO] [stdout] 954 + end: self.current_token().span.end, [INFO] [stdout] 955 + }, [INFO] [stdout] 956 + loc, [INFO] [stdout] 957 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:910:19 [INFO] [stdout] | [INFO] [stdout] 910 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:976:19 [INFO] [stdout] | [INFO] [stdout] 976 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1013:19 [INFO] [stdout] | [INFO] [stdout] 1013 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1033:19 [INFO] [stdout] | [INFO] [stdout] 1033 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1066:9 [INFO] [stdout] | [INFO] [stdout] 1066 | / if !self.current_token_is(TokenKind::Semicolon) { [INFO] [stdout] 1067 | | if let Stmt::Variable(var) = self.parse_variable()? { [INFO] [stdout] 1068 | | initializer = Some(var); [INFO] [stdout] 1069 | | } [INFO] [stdout] 1070 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1066 ~ if !self.current_token_is(TokenKind::Semicolon) [INFO] [stdout] 1067 ~ && let Stmt::Variable(var) = self.parse_variable()? { [INFO] [stdout] 1068 | initializer = Some(var); [INFO] [stdout] 1069 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1164:19 [INFO] [stdout] | [INFO] [stdout] 1164 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1247:19 [INFO] [stdout] | [INFO] [stdout] 1247 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1249:9 [INFO] [stdout] | [INFO] [stdout] 1249 | let is_const; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `is_const` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1249 ~ [INFO] [stdout] 1250 ~ let is_const = if self.current_token_is(TokenKind::Const) { [INFO] [stdout] 1251 | self.next_token(); [INFO] [stdout] 1252 ~ true [INFO] [stdout] 1253 | } else { [INFO] [stdout] 1254 | self.expect_current(TokenKind::Var)?; [INFO] [stdout] 1255 ~ false [INFO] [stdout] 1256 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1416:9 [INFO] [stdout] | [INFO] [stdout] 1416 | / return Ok(Stmt::FuncDef(FuncDef { [INFO] [stdout] 1417 | | ident: func_name, [INFO] [stdout] 1418 | | generic_params, [INFO] [stdout] 1419 | | params, [INFO] [stdout] ... | [INFO] [stdout] 1424 | | loc, [INFO] [stdout] 1425 | | })); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1416 ~ Ok(Stmt::FuncDef(FuncDef { [INFO] [stdout] 1417 + ident: func_name, [INFO] [stdout] 1418 + generic_params, [INFO] [stdout] 1419 + params, [INFO] [stdout] 1420 + body, [INFO] [stdout] 1421 + return_type, [INFO] [stdout] 1422 + modifiers, [INFO] [stdout] 1423 + span: Span { start, end }, [INFO] [stdout] 1424 + loc, [INFO] [stdout] 1425 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1311:19 [INFO] [stdout] | [INFO] [stdout] 1311 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1430:19 [INFO] [stdout] | [INFO] [stdout] 1430 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1457:19 [INFO] [stdout] | [INFO] [stdout] 1457 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1460:9 [INFO] [stdout] | [INFO] [stdout] 1460 | let is_const; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `is_const` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1460 ~ [INFO] [stdout] 1461 ~ let is_const = if self.current_token_is(TokenKind::Const) { [INFO] [stdout] 1462 | self.next_token(); [INFO] [stdout] 1463 ~ true [INFO] [stdout] 1464 | } else { [INFO] [stdout] 1465 | self.expect_current(TokenKind::Var)?; [INFO] [stdout] 1466 ~ false [INFO] [stdout] 1467 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1470:69 [INFO] [stdout] | [INFO] [stdout] 1470 | modifiers.into_global_var_modifiers(SourceLoc::from_loc(loc.clone(), self.file_name.clone()))?; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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: unneeded late initialization [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1510:9 [INFO] [stdout] | [INFO] [stdout] 1510 | let generic_params; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `generic_params` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1510 ~ [INFO] [stdout] 1511 ~ let generic_params = if self.current_token_is(TokenKind::LessThan) { [INFO] [stdout] 1512 ~ Some(self.parse_generic_params()?) [INFO] [stdout] 1513 | } else { [INFO] [stdout] 1514 ~ None [INFO] [stdout] 1515 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1519:19 [INFO] [stdout] | [INFO] [stdout] 1519 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1536:19 [INFO] [stdout] | [INFO] [stdout] 1536 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1574:27 [INFO] [stdout] | [INFO] [stdout] 1574 | let loc = this.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1616:32 [INFO] [stdout] | [INFO] [stdout] 1616 | let case_loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1669:19 [INFO] [stdout] | [INFO] [stdout] 1669 | let loc = self.current_token().loc.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token().loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_parser/src/stmts.rs:1716:26 [INFO] [stdout] | [INFO] [stdout] 1716 | loc: loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> crates/cyrusc_parser/src/lib.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | / if token_kind == TokenKind::EOF { [INFO] [stdout] 142 | | return true; [INFO] [stdout] 143 | | } else { [INFO] [stdout] 144 | | return false; [INFO] [stdout] 145 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `return token_kind == TokenKind::EOF` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> crates/cyrusc_parser/src/lib.rs:156:17 [INFO] [stdout] | [INFO] [stdout] 156 | / if token_kind == TokenKind::EOF { [INFO] [stdout] 157 | | return true; [INFO] [stdout] 158 | | } else { [INFO] [stdout] 159 | | return false; [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `return token_kind == TokenKind::EOF` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VTableRegistry` [INFO] [stdout] --> crates/cyrusc_vtable_registry/src/lib.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / pub fn new() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | map: HashMap::new(), [INFO] [stdout] 78 | | tables: Vec::new(), [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [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] 71 + impl Default for VTableRegistry { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VTableRegistry` [INFO] [stdout] --> crates/cyrusc_vtable_registry/src/lib.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / pub fn new() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | map: HashMap::new(), [INFO] [stdout] 78 | | tables: Vec::new(), [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [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] 71 + impl Default for VTableRegistry { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1433:13 [INFO] [stdout] | [INFO] [stdout] 1433 | is_local: is_local, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `is_local` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1433:13 [INFO] [stdout] | [INFO] [stdout] 1433 | is_local: is_local, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `is_local` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / pub enum SymbolEntryKind { [INFO] [stdout] 44 | | Method(ResolvedMethod), [INFO] [stdout] | | ---------------------- the second-largest variant contains at least 552 bytes [INFO] [stdout] 45 | | Func(ResolvedFunction), [INFO] [stdout] 46 | | Typedef(ResolvedTypedef), [INFO] [stdout] 47 | | GlobalVar(ResolvedGlobalVar), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 1840 bytes [INFO] [stdout] ... | [INFO] [stdout] 52 | | ProxiedSymbol(ModuleID, SymbolID), [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ the entire enum is at least 1840 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] 47 - GlobalVar(ResolvedGlobalVar), [INFO] [stdout] 47 + GlobalVar(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / pub enum LocalSymbolKind { [INFO] [stdout] 137 | | Variable(ResolvedVariable), [INFO] [stdout] | | -------------------------- the largest variant contains at least 1744 bytes [INFO] [stdout] 138 | | Struct(ResolvedStruct), [INFO] [stdout] | | ---------------------- the second-largest variant contains at least 288 bytes [INFO] [stdout] 139 | | Enum(ResolvedEnum), [INFO] [stdout] ... | [INFO] [stdout] 142 | | Union(ResolvedUnion), [INFO] [stdout] 143 | | } [INFO] [stdout] | |_^ the entire enum is at least 1744 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] 137 - Variable(ResolvedVariable), [INFO] [stdout] 137 + Variable(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:247:63 [INFO] [stdout] | [INFO] [stdout] 247 | LocalOrGlobalSymbol::LocalSymbol(local_symbol) => match local_symbol.kind { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 248 | | LocalSymbolKind::Variable(..) => true, [INFO] [stdout] 249 | | _ => false, [INFO] [stdout] 250 | | }, [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] 247 - LocalOrGlobalSymbol::LocalSymbol(local_symbol) => match local_symbol.kind { [INFO] [stdout] 248 - LocalSymbolKind::Variable(..) => true, [INFO] [stdout] 249 - _ => false, [INFO] [stdout] 250 - }, [INFO] [stdout] 247 + LocalOrGlobalSymbol::LocalSymbol(local_symbol) => matches!(local_symbol.kind, LocalSymbolKind::Variable(..)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:251:64 [INFO] [stdout] | [INFO] [stdout] 251 | LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => match symbol_entry.kind { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 252 | | SymbolEntryKind::GlobalVar(..) => true, [INFO] [stdout] 253 | | _ => false, [INFO] [stdout] 254 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 251 - LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => match symbol_entry.kind { [INFO] [stdout] 252 - SymbolEntryKind::GlobalVar(..) => true, [INFO] [stdout] 253 - _ => false, [INFO] [stdout] 254 - }, [INFO] [stdout] 251 + LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => matches!(symbol_entry.kind, SymbolEntryKind::GlobalVar(..)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SymbolTable` [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:525:5 [INFO] [stdout] | [INFO] [stdout] 525 | / pub fn new() -> Self { [INFO] [stdout] 526 | | Self { [INFO] [stdout] 527 | | entries: HashMap::new(), [INFO] [stdout] 528 | | names: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 531 | | } [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] 524 + impl Default for SymbolTable { [INFO] [stdout] 525 + fn default() -> Self { [INFO] [stdout] 526 + Self::new() [INFO] [stdout] 527 + } [INFO] [stdout] 528 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:541:53 [INFO] [stdout] | [INFO] [stdout] 541 | SymbolEntryKind::Func(resolved_func) => resolved_func.func_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_func.func_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:542:59 [INFO] [stdout] | [INFO] [stdout] 542 | SymbolEntryKind::Typedef(resolved_typedef) => resolved_typedef.typedef_sig.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_typedef.typedef_sig.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:543:64 [INFO] [stdout] | [INFO] [stdout] 543 | SymbolEntryKind::GlobalVar(resolved_global_var) => resolved_global_var.global_var_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_global_var.global_var_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:544:57 [INFO] [stdout] | [INFO] [stdout] 544 | SymbolEntryKind::Struct(resolved_struct) => resolved_struct.struct_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_struct.struct_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:545:53 [INFO] [stdout] | [INFO] [stdout] 545 | SymbolEntryKind::Enum(resolved_enum) => resolved_enum.enum_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_enum.enum_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:546:63 [INFO] [stdout] | [INFO] [stdout] 546 | SymbolEntryKind::Interface(resolved_interface) => resolved_interface.interface_sig.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_interface.interface_sig.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:547:57 [INFO] [stdout] | [INFO] [stdout] 547 | SymbolEntryKind::Method(resolved_method) => resolved_method.func_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_method.func_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:548:55 [INFO] [stdout] | [INFO] [stdout] 548 | SymbolEntryKind::Union(resolved_union) => resolved_union.union_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_union.union_sig.modifiers.vis` [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 `u32` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/utility.rs:78:52 [INFO] [stdout] | [INFO] [stdout] 78 | let entry = self.resolve_global_symbol(symbol_id.clone())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `symbol_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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_resolver/src/utility.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(scope) = scope_opt { [INFO] [stdout] 200 | | if let Some(local_symbol) = self.resolve_symbol_from_local_scope(scope, symbol_id) { [INFO] [stdout] 201 | | return Some(LocalOrGlobalSymbol::LocalSymbol(local_symbol)); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if let Some(scope) = scope_opt [INFO] [stdout] 200 ~ && let Some(local_symbol) = self.resolve_symbol_from_local_scope(scope, symbol_id) { [INFO] [stdout] 201 | return Some(LocalOrGlobalSymbol::LocalSymbol(local_symbol)); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:154:29 [INFO] [stdout] | [INFO] [stdout] 154 | global_symbols: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `Mutex>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:158:28 [INFO] [stdout] | [INFO] [stdout] 158 | program_trees: Arc::new(Mutex::new(Vec::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>>` is not `Send` and `Sync` as `Mutex>>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex>>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:214:44 [INFO] [stdout] | [INFO] [stdout] 214 | self.resolve_decl_names(module_id, &ast); [INFO] [stdout] | ^^^^ help: change this to: `ast` [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] --> crates/cyrusc_resolver/src/lib.rs:220:59 [INFO] [stdout] | [INFO] [stdout] 220 | self.resolve_import(parent_module_id, import, &mut visiting); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `visiting` [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] --> crates/cyrusc_resolver/src/lib.rs:226:62 [INFO] [stdout] | [INFO] [stdout] 226 | let typed_body = self.resolve_definitions(module_id, &ast); [INFO] [stdout] | ^^^^ help: change this to: `ast` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:289:25 [INFO] [stdout] | [INFO] [stdout] 289 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:303:64 [INFO] [stdout] | [INFO] [stdout] 303 | global_symbols.entry(module_id).or_insert_with(|| SymbolTable::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SymbolTable::new` [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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:322:25 [INFO] [stdout] | [INFO] [stdout] 322 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:343:29 [INFO] [stdout] | [INFO] [stdout] 343 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:361:29 [INFO] [stdout] | [INFO] [stdout] 361 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:370:21 [INFO] [stdout] | [INFO] [stdout] 370 | &loaded_module.program.as_ref(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `loaded_module.program.as_ref()` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:403:33 [INFO] [stdout] | [INFO] [stdout] 403 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:421:25 [INFO] [stdout] | [INFO] [stdout] 421 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:450:25 [INFO] [stdout] | [INFO] [stdout] 450 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:464:72 [INFO] [stdout] | [INFO] [stdout] 464 | self.check_import_single_vis(actual_name.clone(), vis, loc.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:480:29 [INFO] [stdout] | [INFO] [stdout] 480 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:541:25 [INFO] [stdout] | [INFO] [stdout] 541 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:557:25 [INFO] [stdout] | [INFO] [stdout] 557 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:563:50 [INFO] [stdout] | [INFO] [stdout] 563 | loc: SourceLoc::from_loc(key.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `key.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:585:37 [INFO] [stdout] | [INFO] [stdout] 585 | ... generic_param.param_name.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:603:25 [INFO] [stdout] | [INFO] [stdout] 603 | generic_param.param_name.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:614:50 [INFO] [stdout] | [INFO] [stdout] 614 | loc: SourceLoc::from_loc(generic_param.param_name.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:633:17 [INFO] [stdout] | [INFO] [stdout] 633 | / generic_params [INFO] [stdout] 634 | | .list [INFO] [stdout] 635 | | .iter() [INFO] [stdout] 636 | | .find(|param| param.param_name.name == ident.as_string()) [INFO] [stdout] 637 | | .and_then(|generic_param| Some(SemanticType::GenericParam(generic_param.clone()))) [INFO] [stdout] | |______________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 633 ~ generic_params [INFO] [stdout] 634 + .list [INFO] [stdout] 635 + .iter() [INFO] [stdout] 636 + .find(|param| param.param_name.name == ident.as_string()).map(|generic_param| SemanticType::GenericParam(generic_param.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:664:21 [INFO] [stdout] | [INFO] [stdout] 664 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:675:25 [INFO] [stdout] | [INFO] [stdout] 675 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:686:50 [INFO] [stdout] | [INFO] [stdout] 686 | loc: SourceLoc::from_loc(generic_inst.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_inst.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:704:29 [INFO] [stdout] | [INFO] [stdout] 704 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:712:46 [INFO] [stdout] | [INFO] [stdout] 712 | loc: SourceLoc::from_loc(tuple_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:726:29 [INFO] [stdout] | [INFO] [stdout] 726 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:742:29 [INFO] [stdout] | [INFO] [stdout] 742 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:755:21 [INFO] [stdout] | [INFO] [stdout] 755 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:765:46 [INFO] [stdout] | [INFO] [stdout] 765 | loc: SourceLoc::from_loc(loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:779:21 [INFO] [stdout] | [INFO] [stdout] 779 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:790:21 [INFO] [stdout] | [INFO] [stdout] 790 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:801:21 [INFO] [stdout] | [INFO] [stdout] 801 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:826:46 [INFO] [stdout] | [INFO] [stdout] 826 | loc: SourceLoc::from_loc(loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:838:25 [INFO] [stdout] | [INFO] [stdout] 838 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:844:54 [INFO] [stdout] | [INFO] [stdout] 844 | ... loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:851:46 [INFO] [stdout] | [INFO] [stdout] 851 | loc: SourceLoc::from_loc(unnamed_union_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:879:37 [INFO] [stdout] | [INFO] [stdout] 879 | ... valued_field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:886:49 [INFO] [stdout] | [INFO] [stdout] 886 | ... valued_field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:902:46 [INFO] [stdout] | [INFO] [stdout] 902 | loc: SourceLoc::from_loc(unnamed_enum_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:914:25 [INFO] [stdout] | [INFO] [stdout] 914 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:920:54 [INFO] [stdout] | [INFO] [stdout] 920 | ... loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:928:46 [INFO] [stdout] | [INFO] [stdout] 928 | loc: SourceLoc::from_loc(struct_spec.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_spec.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:961:42 [INFO] [stdout] | [INFO] [stdout] 961 | loc: SourceLoc::from_loc(self_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:987:29 [INFO] [stdout] | [INFO] [stdout] 987 | .unwrap_or_else(|| generate_symbol_id()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `generate_symbol_id` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:999:13 [INFO] [stdout] | [INFO] [stdout] 999 | typedef.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1007:18 [INFO] [stdout] | [INFO] [stdout] 1007 | vis: typedef.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.vis` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1008:38 [INFO] [stdout] | [INFO] [stdout] 1008 | loc: SourceLoc::from_loc(typedef.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1040:18 [INFO] [stdout] | [INFO] [stdout] 1040 | vis: typedef.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.vis` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1052:65 [INFO] [stdout] | [INFO] [stdout] 1052 | fn insert_symbol_name(&mut self, module_id: ModuleID, name: &String) -> SymbolID { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1052 ~ fn insert_symbol_name(&mut self, module_id: ModuleID, name: &str) -> SymbolID { [INFO] [stdout] 1053 | let symbol_id = generate_symbol_id(); [INFO] [stdout] 1054 | let mut global_symbols = self.global_symbols.lock().unwrap(); [INFO] [stdout] 1055 | let symbol_table = global_symbols.get_mut(&module_id).unwrap(); [INFO] [stdout] 1056 ~ symbol_table.names.insert(name.to_owned(), symbol_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1070:45 [INFO] [stdout] | [INFO] [stdout] 1070 | SourceLoc::from_loc(interface.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1081:45 [INFO] [stdout] | [INFO] [stdout] 1081 | SourceLoc::from_loc(union_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1092:45 [INFO] [stdout] | [INFO] [stdout] 1092 | SourceLoc::from_loc(typedef.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1103:45 [INFO] [stdout] | [INFO] [stdout] 1103 | SourceLoc::from_loc(func_def.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1114:45 [INFO] [stdout] | [INFO] [stdout] 1114 | SourceLoc::from_loc(func_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1125:45 [INFO] [stdout] | [INFO] [stdout] 1125 | SourceLoc::from_loc(global_variable.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1136:45 [INFO] [stdout] | [INFO] [stdout] 1136 | SourceLoc::from_loc(struct_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1147:45 [INFO] [stdout] | [INFO] [stdout] 1147 | SourceLoc::from_loc(enum_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1198:69 [INFO] [stdout] | [INFO] [stdout] 1198 | Stmt::Variable(variable) => Err(SourceLoc::from_loc(variable.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1199:62 [INFO] [stdout] | [INFO] [stdout] 1199 | Stmt::If(if_stmt) => Err(SourceLoc::from_loc(if_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `if_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1201:45 [INFO] [stdout] | [INFO] [stdout] 1201 | Err(SourceLoc::from_loc(return_stmt.loc.clone(), self.current_file_path())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `return_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1203:64 [INFO] [stdout] | [INFO] [stdout] 1203 | Stmt::For(for_stmt) => Err(SourceLoc::from_loc(for_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `for_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1204:67 [INFO] [stdout] | [INFO] [stdout] 1204 | Stmt::Foreach(foreach) => Err(SourceLoc::from_loc(foreach.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `foreach.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1205:65 [INFO] [stdout] | [INFO] [stdout] 1205 | Stmt::Switch(switch) => Err(SourceLoc::from_loc(switch.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `switch.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1207:21 [INFO] [stdout] | [INFO] [stdout] 1207 | block_statement.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_statement.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1210:68 [INFO] [stdout] | [INFO] [stdout] 1210 | Stmt::Break(break_stmt) => Err(SourceLoc::from_loc(break_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `break_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1212:45 [INFO] [stdout] | [INFO] [stdout] 1212 | Err(SourceLoc::from_loc(continue_stmt.loc.clone(), self.current_file_path())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `continue_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1214:63 [INFO] [stdout] | [INFO] [stdout] 1214 | Stmt::Defer(defer) => Err(SourceLoc::from_loc(defer.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `defer.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1215:68 [INFO] [stdout] | [INFO] [stdout] 1215 | Stmt::While(while_stmt) => Err(SourceLoc::from_loc(while_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `while_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1217:21 [INFO] [stdout] | [INFO] [stdout] 1217 | export_tuple_values.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple_values.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1220:63 [INFO] [stdout] | [INFO] [stdout] 1220 | Stmt::Label(label) => Err(SourceLoc::from_loc(label.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `label.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1221:61 [INFO] [stdout] | [INFO] [stdout] 1221 | Stmt::Goto(goto) => Err(SourceLoc::from_loc(goto.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `goto.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1270:29 [INFO] [stdout] | [INFO] [stdout] 1270 | ... func_decl.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1292:46 [INFO] [stdout] | [INFO] [stdout] 1292 | loc: SourceLoc::from_loc(func_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1306:22 [INFO] [stdout] | [INFO] [stdout] 1306 | vis: interface.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.vis` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1307:42 [INFO] [stdout] | [INFO] [stdout] 1307 | loc: SourceLoc::from_loc(interface.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1332:18 [INFO] [stdout] | [INFO] [stdout] 1332 | vis: interface.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.vis` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1333:38 [INFO] [stdout] | [INFO] [stdout] 1333 | loc: SourceLoc::from_loc(interface.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1366:17 [INFO] [stdout] | [INFO] [stdout] 1366 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1373:50 [INFO] [stdout] | [INFO] [stdout] 1373 | loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1382:23 [INFO] [stdout] | [INFO] [stdout] 1382 | let methods = match self.resolve_methods( [INFO] [stdout] | _______________________^ [INFO] [stdout] 1383 | | module_id, [INFO] [stdout] 1384 | | &union_decl.methods, [INFO] [stdout] 1385 | | union_symbol_id, [INFO] [stdout] ... | [INFO] [stdout] 1389 | | None => return None, [INFO] [stdout] 1390 | | }; [INFO] [stdout] | |_________^ [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] help: try instead [INFO] [stdout] | [INFO] [stdout] 1382 ~ let methods = self.resolve_methods( [INFO] [stdout] 1383 + module_id, [INFO] [stdout] 1384 + &union_decl.methods, [INFO] [stdout] 1385 + union_symbol_id, [INFO] [stdout] 1386 + generic_params.is_some(), [INFO] [stdout] 1387 ~ )?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1402:42 [INFO] [stdout] | [INFO] [stdout] 1402 | loc: SourceLoc::from_loc(union_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1421:96 [INFO] [stdout] | [INFO] [stdout] 1421 | let impls = self.resolve_object_impls(scope_opt.clone(), module_id, &union_decl.impls, union_decl.loc.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1432:38 [INFO] [stdout] | [INFO] [stdout] 1432 | loc: SourceLoc::from_loc(union_decl.ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union_decl.ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1471:29 [INFO] [stdout] | [INFO] [stdout] 1471 | ... valued_field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1480:54 [INFO] [stdout] | [INFO] [stdout] 1480 | ... loc: SourceLoc::from_loc(valued_field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:1488:55 [INFO] [stdout] | [INFO] [stdout] 1488 | Some(scope) => Some(Rc::clone(&scope)), [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1504:13 [INFO] [stdout] | [INFO] [stdout] 1504 | / match self.resolve_methods(module_id, &enum_decl.methods, enum_symbol_id, generic_params.is_some()) { [INFO] [stdout] 1505 | | Some(methods) => methods, [INFO] [stdout] 1506 | | None => return None, [INFO] [stdout] 1507 | | }; [INFO] [stdout] | |_____________^ help: try instead: `self.resolve_methods(module_id, &enum_decl.methods, enum_symbol_id, generic_params.is_some())?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1519:42 [INFO] [stdout] | [INFO] [stdout] 1519 | loc: SourceLoc::from_loc(enum_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1538:95 [INFO] [stdout] | [INFO] [stdout] 1538 | let impls = self.resolve_object_impls(scope_opt.clone(), module_id, &enum_decl.impls, enum_decl.loc.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1549:38 [INFO] [stdout] | [INFO] [stdout] 1549 | loc: SourceLoc::from_loc(enum_decl.ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_decl.ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1558:74 [INFO] [stdout] | [INFO] [stdout] 1558 | .and_then(|ty| self.resolve_type(&None, None, module_id, ty, global_var.loc.clone(), global_var.span.end)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_var.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1579:42 [INFO] [stdout] | [INFO] [stdout] 1579 | loc: SourceLoc::from_loc(global_var.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_var.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1597:38 [INFO] [stdout] | [INFO] [stdout] 1597 | loc: SourceLoc::from_loc(global_var.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_var.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1615:25 [INFO] [stdout] | [INFO] [stdout] 1615 | func_def.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1675:46 [INFO] [stdout] | [INFO] [stdout] 1675 | loc: SourceLoc::from_loc(func_def.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1874:21 [INFO] [stdout] | [INFO] [stdout] 1874 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1879:26 [INFO] [stdout] | [INFO] [stdout] 1879 | vis: field.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.vis` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1881:46 [INFO] [stdout] | [INFO] [stdout] 1881 | loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1898:13 [INFO] [stdout] | [INFO] [stdout] 1898 | struct_decl.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1912:42 [INFO] [stdout] | [INFO] [stdout] 1912 | loc: SourceLoc::from_loc(struct_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1939:38 [INFO] [stdout] | [INFO] [stdout] 1939 | loc: SourceLoc::from_loc(struct_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_decl.loc` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1949:10 [INFO] [stdout] | [INFO] [stdout] 1949 | ) -> Option<( [INFO] [stdout] | __________^ [INFO] [stdout] 1950 | | SemanticType, [INFO] [stdout] 1951 | | Vec, [INFO] [stdout] 1952 | | Option, [INFO] [stdout] 1953 | | Option, [INFO] [stdout] 1954 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1956:75 [INFO] [stdout] | [INFO] [stdout] 1956 | return_type_or_void_as_default(func_decl.return_type.clone(), func_decl.loc.clone(), func_decl.span); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1968:13 [INFO] [stdout] | [INFO] [stdout] 1968 | func_decl.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1996:29 [INFO] [stdout] | [INFO] [stdout] 1996 | ... func_param.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_param.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2004:37 [INFO] [stdout] | [INFO] [stdout] 2004 | ... func_param.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_param.loc` [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: large size difference between variants [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / pub enum SymbolEntryKind { [INFO] [stdout] 44 | | Method(ResolvedMethod), [INFO] [stdout] | | ---------------------- the second-largest variant contains at least 552 bytes [INFO] [stdout] 45 | | Func(ResolvedFunction), [INFO] [stdout] 46 | | Typedef(ResolvedTypedef), [INFO] [stdout] 47 | | GlobalVar(ResolvedGlobalVar), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 1840 bytes [INFO] [stdout] ... | [INFO] [stdout] 52 | | ProxiedSymbol(ModuleID, SymbolID), [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ the entire enum is at least 1840 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] 47 - GlobalVar(ResolvedGlobalVar), [INFO] [stdout] 47 + GlobalVar(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2028:62 [INFO] [stdout] | [INFO] [stdout] 2028 | ... loc: SourceLoc::from_loc(func_param.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_param.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2038:50 [INFO] [stdout] | [INFO] [stdout] 2038 | loc: SourceLoc::from_loc(func_param.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_param.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2047:50 [INFO] [stdout] | [INFO] [stdout] 2047 | loc: SourceLoc::from_loc(self_modifier.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_modifier.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2061:21 [INFO] [stdout] | [INFO] [stdout] 2061 | ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2081:58 [INFO] [stdout] | [INFO] [stdout] 2081 | ... loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2091:50 [INFO] [stdout] | [INFO] [stdout] 2091 | loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2119:38 [INFO] [stdout] | [INFO] [stdout] 2119 | loc: SourceLoc::from_loc(func_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2144:38 [INFO] [stdout] | [INFO] [stdout] 2144 | loc: SourceLoc::from_loc(func_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2170:38 [INFO] [stdout] | [INFO] [stdout] 2170 | loc: SourceLoc::from_loc(func_def.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2200:38 [INFO] [stdout] | [INFO] [stdout] 2200 | loc: SourceLoc::from_loc(func_def.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2218:21 [INFO] [stdout] | [INFO] [stdout] 2218 | variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2232:17 [INFO] [stdout] | [INFO] [stdout] 2232 | variable.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2251:38 [INFO] [stdout] | [INFO] [stdout] 2251 | loc: SourceLoc::from_loc(variable.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2269:20 [INFO] [stdout] | [INFO] [stdout] 2269 | let cond = match self.resolve_expr(module_id, Some(Rc::clone(&scope)), &if_stmt.condition) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2270 | | Some(typed_expr) => typed_expr, [INFO] [stdout] 2271 | | None => return None, [INFO] [stdout] 2272 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.resolve_expr(module_id, Some(Rc::clone(&scope)), &if_stmt.condition)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2289:94 [INFO] [stdout] | [INFO] [stdout] 2289 | match self.resolve_block_stmt(else_block_scope_id, else_block_scope.clone(), &*alternate) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 2289 - match self.resolve_block_stmt(else_block_scope_id, else_block_scope.clone(), &*alternate) { [INFO] [stdout] 2289 + match self.resolve_block_stmt(else_block_scope_id, else_block_scope.clone(), alternate) { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 2289 | match self.resolve_block_stmt(else_block_scope_id, else_block_scope.clone(), &**alternate) { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2314:38 [INFO] [stdout] | [INFO] [stdout] 2314 | loc: SourceLoc::from_loc(if_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `if_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2334:54 [INFO] [stdout] | [INFO] [stdout] 2334 | ... loc: SourceLoc::from_loc(defer.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `defer.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2350:38 [INFO] [stdout] | [INFO] [stdout] 2350 | loc: SourceLoc::from_loc(block_statement.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_statement.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2367:17 [INFO] [stdout] | [INFO] [stdout] 2367 | export_tuple.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2389:25 [INFO] [stdout] | [INFO] [stdout] 2389 | ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2404:42 [INFO] [stdout] | [INFO] [stdout] 2404 | loc: SourceLoc::from_loc(ident.loc.clone(), this.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2447:42 [INFO] [stdout] | [INFO] [stdout] 2447 | ... loc: export_tuple.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2469:38 [INFO] [stdout] | [INFO] [stdout] 2469 | loc: SourceLoc::from_loc(export_tuple.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `export_tuple.loc` [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: parameter is only used in recursion [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2357:9 [INFO] [stdout] | [INFO] [stdout] 2357 | scope_id: ScopeID, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_scope_id` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2440:33 [INFO] [stdout] | [INFO] [stdout] 2440 | ... scope_id, [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: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2733:9 [INFO] [stdout] | [INFO] [stdout] 2480 | / let typed_stmt = match stmt { [INFO] [stdout] 2481 | | Stmt::ExportTuple(export_tuple) => self.resolve_export_tuple(module_id, scope_id, scope, export_tuple), [INFO] [stdout] 2482 | | Stmt::Variable(variable) => { [INFO] [stdout] 2483 | | let typed_var = self.declare_local_variable(module_id, scope.clone(), &variable)?; [INFO] [stdout] ... | [INFO] [stdout] 2730 | | Stmt::Defer(_) => unreachable!(), [INFO] [stdout] 2731 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 2732 | [INFO] [stdout] 2733 | typed_stmt [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 2480 ~ [INFO] [stdout] 2481 | [INFO] [stdout] 2482 ~ match stmt { [INFO] [stdout] 2483 + Stmt::ExportTuple(export_tuple) => self.resolve_export_tuple(module_id, scope_id, scope, export_tuple), [INFO] [stdout] 2484 + Stmt::Variable(variable) => { [INFO] [stdout] 2485 + let typed_var = self.declare_local_variable(module_id, scope.clone(), &variable)?; [INFO] [stdout] 2486 + Some(TypedStmt::Variable(typed_var)) [INFO] [stdout] 2487 + } [INFO] [stdout] 2488 + Stmt::Expr(expr) => { [INFO] [stdout] 2489 + let typed_expr = self.resolve_expr(module_id, Some(Rc::clone(&scope)), expr)?; [INFO] [stdout] 2490 + Some(TypedStmt::Expr(typed_expr)) [INFO] [stdout] 2491 + } [INFO] [stdout] 2492 + Stmt::If(if_stmt) => { [INFO] [stdout] 2493 + let typed_if = self.resolve_if_stmt(module_id, Rc::clone(&scope), if_stmt)?; [INFO] [stdout] 2494 + Some(TypedStmt::If(typed_if)) [INFO] [stdout] 2495 + } [INFO] [stdout] 2496 + Stmt::Return(return_stmt) => { [INFO] [stdout] 2497 + let arg = if let Some(argument) = &return_stmt.argument { [INFO] [stdout] 2498 + Some(self.resolve_expr(module_id, Some(Rc::clone(&scope)), argument)?) [INFO] [stdout] 2499 + } else { [INFO] [stdout] 2500 + None [INFO] [stdout] 2501 + }; [INFO] [stdout] 2502 + Some(TypedStmt::Return(TypedReturnStmt { [INFO] [stdout] 2503 + arg, [INFO] [stdout] 2504 + loc: SourceLoc::from_loc(return_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] 2505 + })) [INFO] [stdout] 2506 + } [INFO] [stdout] 2507 + Stmt::Foreach(..) => todo!(), [INFO] [stdout] 2508 + Stmt::For(for_stmt) => { [INFO] [stdout] 2509 + let body_scope_id = generate_scope_id(); [INFO] [stdout] 2510 + let body_scope = LocalScope::new(Some(scope.clone())); [INFO] [stdout] 2511 + self.insert_scope_ref(module_id, body_scope_id, body_scope.clone()); [INFO] [stdout] 2512 + [INFO] [stdout] 2513 + let initializer = if let Some(variable) = &for_stmt.initializer { [INFO] [stdout] 2514 + Some(self.declare_local_variable(module_id, Rc::clone(&body_scope), &variable)?) [INFO] [stdout] 2515 + } else { [INFO] [stdout] 2516 + None [INFO] [stdout] 2517 + }; [INFO] [stdout] 2518 + [INFO] [stdout] 2519 + let cond = if let Some(expr) = &for_stmt.condition { [INFO] [stdout] 2520 + Some(self.resolve_expr(module_id, Some(Rc::clone(&body_scope)), expr)?) [INFO] [stdout] 2521 + } else { [INFO] [stdout] 2522 + None [INFO] [stdout] 2523 + }; [INFO] [stdout] 2524 + [INFO] [stdout] 2525 + let increment = if let Some(expr) = &for_stmt.increment { [INFO] [stdout] 2526 + Some(self.resolve_expr(module_id, Some(Rc::clone(&body_scope)), expr)?) [INFO] [stdout] 2527 + } else { [INFO] [stdout] 2528 + None [INFO] [stdout] 2529 + }; [INFO] [stdout] 2530 + [INFO] [stdout] 2531 + let body = Box::new(self.resolve_block_stmt(body_scope_id, Rc::clone(&body_scope), &*for_stmt.body)?); [INFO] [stdout] 2532 + [INFO] [stdout] 2533 + Some(TypedStmt::For(TypedForStmt { [INFO] [stdout] 2534 + initializer, [INFO] [stdout] 2535 + cond, [INFO] [stdout] 2536 + increment, [INFO] [stdout] 2537 + body, [INFO] [stdout] 2538 + loc: SourceLoc::from_loc(for_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] 2539 + })) [INFO] [stdout] 2540 + } [INFO] [stdout] 2541 + Stmt::While(while_stmt) => { [INFO] [stdout] 2542 + let body_scope_id = generate_scope_id(); [INFO] [stdout] 2543 + let body_scope = LocalScope::new(Some(scope.clone())); [INFO] [stdout] 2544 + self.insert_scope_ref(module_id, body_scope_id, body_scope.clone()); [INFO] [stdout] 2545 + [INFO] [stdout] 2546 + let cond = self.resolve_expr(module_id, Some(Rc::clone(&body_scope)), &while_stmt.condition)?; [INFO] [stdout] 2547 + [INFO] [stdout] 2548 + let while_typed_body = [INFO] [stdout] 2549 + Box::new(self.resolve_block_stmt(body_scope_id, Rc::clone(&body_scope), &*while_stmt.body)?); [INFO] [stdout] 2550 + [INFO] [stdout] 2551 + Some(TypedStmt::While(TypedWhileStmt { [INFO] [stdout] 2552 + cond, [INFO] [stdout] 2553 + body: while_typed_body, [INFO] [stdout] 2554 + loc: SourceLoc::from_loc(while_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] 2555 + })) [INFO] [stdout] 2556 + } [INFO] [stdout] 2557 + Stmt::Switch(switch) => { [INFO] [stdout] 2558 + let operand = self.resolve_expr(module_id, Some(Rc::clone(&scope)), &switch.operand)?; [INFO] [stdout] 2559 + [INFO] [stdout] 2560 + let mut cases: Vec = Vec::new(); [INFO] [stdout] 2561 + for case in &switch.cases { [INFO] [stdout] 2562 + let case_scope_rc = LocalScope::new(Some(scope.clone())); [INFO] [stdout] 2563 + let case_scope_id = generate_scope_id(); [INFO] [stdout] 2564 + self.insert_scope_ref(module_id, case_scope_id, case_scope_rc.clone()); [INFO] [stdout] 2565 + [INFO] [stdout] 2566 + let mut patterns = Vec::new(); [INFO] [stdout] 2567 + [INFO] [stdout] 2568 + for pattern in &case.patterns { [INFO] [stdout] 2569 + let typed_pattern = match pattern { [INFO] [stdout] 2570 + SwitchCasePattern::Expr(expr) => { [INFO] [stdout] 2571 + let typed_expr = self.resolve_expr(module_id, Some(Rc::clone(&scope)), &expr)?; [INFO] [stdout] 2572 + let loc = typed_expr.loc.clone(); [INFO] [stdout] 2573 + TypedSwitchCasePattern::Expr(typed_expr, loc) [INFO] [stdout] 2574 + } [INFO] [stdout] 2575 + SwitchCasePattern::Ident(ident) => { [INFO] [stdout] 2576 + let symbol_id = generate_symbol_id(); [INFO] [stdout] 2577 + let mut case_scope = case_scope_rc.borrow_mut(); [INFO] [stdout] 2578 + case_scope.insert( [INFO] [stdout] 2579 + ident.value.clone(), [INFO] [stdout] 2580 + LocalSymbol::new(LocalSymbolKind::Variable(ResolvedVariable { [INFO] [stdout] 2581 + module_id, [INFO] [stdout] 2582 + symbol_id, [INFO] [stdout] 2583 + typed_variable: TypedVarStmt { [INFO] [stdout] 2584 + symbol_id, [INFO] [stdout] 2585 + name: ident.value.clone(), [INFO] [stdout] 2586 + ty: None, [INFO] [stdout] 2587 + rhs: None, [INFO] [stdout] 2588 + is_const: false, [INFO] [stdout] 2589 + analyzed: true, [INFO] [stdout] 2590 + loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] 2591 + }, [INFO] [stdout] 2592 + })), [INFO] [stdout] 2593 + ); [INFO] [stdout] 2594 + drop(case_scope); [INFO] [stdout] 2595 + [INFO] [stdout] 2596 + TypedSwitchCasePattern::Ident( [INFO] [stdout] 2597 + ident.value.clone(), [INFO] [stdout] 2598 + SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] 2599 + ) [INFO] [stdout] 2600 + } [INFO] [stdout] 2601 + SwitchCasePattern::EnumVariant(ident, valued_fields) => { [INFO] [stdout] 2602 + TypedSwitchCasePattern::EnumVariant( [INFO] [stdout] 2603 + ident.value.clone(), [INFO] [stdout] 2604 + valued_fields [INFO] [stdout] 2605 + .iter() [INFO] [stdout] 2606 + .map(|ident| { [INFO] [stdout] 2607 + let symbol_id = generate_symbol_id(); [INFO] [stdout] 2608 + let mut case_scope = case_scope_rc.borrow_mut(); [INFO] [stdout] 2609 + case_scope.insert( [INFO] [stdout] 2610 + ident.value.clone(), [INFO] [stdout] 2611 + LocalSymbol::new(LocalSymbolKind::Variable(ResolvedVariable { [INFO] [stdout] 2612 + module_id, [INFO] [stdout] 2613 + symbol_id, [INFO] [stdout] 2614 + typed_variable: TypedVarStmt { [INFO] [stdout] 2615 + symbol_id, [INFO] [stdout] 2616 + name: ident.value.clone(), [INFO] [stdout] 2617 + ty: None, [INFO] [stdout] 2618 + rhs: None, [INFO] [stdout] 2619 + is_const: false, [INFO] [stdout] 2620 + analyzed: true, [INFO] [stdout] 2621 + loc: SourceLoc::from_loc( [INFO] [stdout] 2622 + ident.loc.clone(), [INFO] [stdout] 2623 + self.current_file_path(), [INFO] [stdout] 2624 + ), [INFO] [stdout] 2625 + }, [INFO] [stdout] 2626 + })), [INFO] [stdout] 2627 + ); [INFO] [stdout] 2628 + drop(case_scope); [INFO] [stdout] 2629 + TypedIdentifier { [INFO] [stdout] 2630 + name: ident.value.clone(), [INFO] [stdout] 2631 + symbol_id, [INFO] [stdout] 2632 + loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] 2633 + } [INFO] [stdout] 2634 + }) [INFO] [stdout] 2635 + .collect(), [INFO] [stdout] 2636 + SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] 2637 + ) [INFO] [stdout] 2638 + } [INFO] [stdout] 2639 + SwitchCasePattern::Range(range) => { [INFO] [stdout] 2640 + let lower = self.resolve_expr(module_id, Some(scope.clone()), &range.lower); [INFO] [stdout] 2641 + let upper = self.resolve_expr(module_id, Some(scope.clone()), &range.upper); [INFO] [stdout] 2642 + [INFO] [stdout] 2643 + TypedSwitchCasePattern::Range(TypedRange { [INFO] [stdout] 2644 + lower: lower?, [INFO] [stdout] 2645 + upper: upper?, [INFO] [stdout] 2646 + inclusive_upper: range.inclusive_upper, [INFO] [stdout] 2647 + loc: SourceLoc::from_loc(range.loc.clone(), self.current_file_path()), [INFO] [stdout] 2648 + }) [INFO] [stdout] 2649 + } [INFO] [stdout] 2650 + }; [INFO] [stdout] 2651 + [INFO] [stdout] 2652 + patterns.push(typed_pattern); [INFO] [stdout] 2653 + } [INFO] [stdout] 2654 + [INFO] [stdout] 2655 + let mut body = self.resolve_block_stmt(scope_id, case_scope_rc.clone(), &case.body)?; [INFO] [stdout] 2656 + body.scope_id = case_scope_id; [INFO] [stdout] 2657 + [INFO] [stdout] 2658 + cases.push(TypedSwitchCase { [INFO] [stdout] 2659 + patterns, [INFO] [stdout] 2660 + body: Box::new(body), [INFO] [stdout] 2661 + loc: SourceLoc::from_loc(case.loc.clone(), self.current_file_path()), [INFO] [stdout] 2662 + }); [INFO] [stdout] 2663 + drop(case_scope_rc); [INFO] [stdout] 2664 + } [INFO] [stdout] 2665 + [INFO] [stdout] 2666 + let default_case = if let Some(default_case) = &switch.default_case { [INFO] [stdout] 2667 + let body_scope_id = generate_scope_id(); [INFO] [stdout] 2668 + let body_scope = LocalScope::new(Some(scope.clone())); [INFO] [stdout] 2669 + self.insert_scope_ref(module_id, body_scope_id, body_scope.clone()); [INFO] [stdout] 2670 + [INFO] [stdout] 2671 + Some(self.resolve_block_stmt(body_scope_id, body_scope.clone(), &default_case)?) [INFO] [stdout] 2672 + } else { [INFO] [stdout] 2673 + None [INFO] [stdout] 2674 + }; [INFO] [stdout] 2675 + [INFO] [stdout] 2676 + Some(TypedStmt::Switch(TypedSwitchStmt { [INFO] [stdout] 2677 + operand, [INFO] [stdout] 2678 + cases, [INFO] [stdout] 2679 + default_case, [INFO] [stdout] 2680 + loc: SourceLoc::from_loc(switch.loc.clone(), self.current_file_path()), [INFO] [stdout] 2681 + })) [INFO] [stdout] 2682 + } [INFO] [stdout] 2683 + Stmt::Enum(enum_decl) => { [INFO] [stdout] 2684 + let typed_stmt = [INFO] [stdout] 2685 + self.resolve_enum_stmt(module_id, Some(Rc::clone(&scope)), enum_decl, Some(scope_id))?; [INFO] [stdout] 2686 + Some(typed_stmt) [INFO] [stdout] 2687 + } [INFO] [stdout] 2688 + Stmt::Union(union_decl) => { [INFO] [stdout] 2689 + let typed_stmt = [INFO] [stdout] 2690 + self.resolve_union_stmt(module_id, Some(Rc::clone(&scope)), union_decl, Some(scope_id))?; [INFO] [stdout] 2691 + Some(typed_stmt) [INFO] [stdout] 2692 + } [INFO] [stdout] 2693 + Stmt::Interface(interface) => { [INFO] [stdout] 2694 + let typed_stmt = self.resolve_interface_stmt(module_id, Some(scope.clone()), interface)?; [INFO] [stdout] 2695 + Some(typed_stmt) [INFO] [stdout] 2696 + } [INFO] [stdout] 2697 + Stmt::Struct(struct_decl) => { [INFO] [stdout] 2698 + let typed_stmt = [INFO] [stdout] 2699 + self.resolve_struct_stmt(module_id, Some(scope.clone()), struct_decl, Some(scope_id))?; [INFO] [stdout] 2700 + Some(typed_stmt) [INFO] [stdout] 2701 + } [INFO] [stdout] 2702 + Stmt::BlockStmt(block_statement) => { [INFO] [stdout] 2703 + let scope_id = generate_scope_id(); [INFO] [stdout] 2704 + let new_local_scope = LocalScope::new(Some(scope.clone())); [INFO] [stdout] 2705 + [INFO] [stdout] 2706 + self.insert_scope_ref(module_id, scope_id, new_local_scope.clone()); [INFO] [stdout] 2707 + [INFO] [stdout] 2708 + let typed_stmt = self.resolve_block_stmt(scope_id, new_local_scope, block_statement)?; [INFO] [stdout] 2709 + Some(TypedStmt::BlockStmt(typed_stmt)) [INFO] [stdout] 2710 + } [INFO] [stdout] 2711 + Stmt::Break(break_stmt) => Some(TypedStmt::Break(TypedBreakStmt { [INFO] [stdout] 2712 + loc: SourceLoc::from_loc(break_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] 2713 + })), [INFO] [stdout] 2714 + Stmt::Continue(continue_stmt) => Some(TypedStmt::Continue(TypedContinueStmt { [INFO] [stdout] 2715 + loc: SourceLoc::from_loc(continue_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] 2716 + })), [INFO] [stdout] 2717 + Stmt::Typedef(typedef) => { [INFO] [stdout] 2718 + let typed_stmt = self.resolve_typedef_stmt(module_id, Some(scope.clone()), &typedef)?; [INFO] [stdout] 2719 + Some(typed_stmt) [INFO] [stdout] 2720 + } [INFO] [stdout] 2721 + Stmt::GlobalVar(..) | Stmt::FuncDef(..) | Stmt::FuncDecl(..) | Stmt::Import(..) => { [INFO] [stdout] 2722 + self.reporter.report(Diag { [INFO] [stdout] 2723 + level: DiagLevel::Error, [INFO] [stdout] 2724 + kind: Box::new(ResolverDiagKind::InvalidStatement), [INFO] [stdout] 2725 + location: Some(DiagLoc::new(SourceLoc::from_loc(stmt.loc(), self.current_file_path()))), [INFO] [stdout] 2726 + hint: None, [INFO] [stdout] 2727 + }); [INFO] [stdout] 2728 + None [INFO] [stdout] 2729 + } [INFO] [stdout] 2730 + Stmt::Label(label) => self.resolve_label(scope, label), [INFO] [stdout] 2731 + Stmt::Goto(goto) => self.resolve_goto(goto), [INFO] [stdout] 2732 + Stmt::Defer(_) => unreachable!(), [INFO] [stdout] 2733 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / pub enum LocalSymbolKind { [INFO] [stdout] 137 | | Variable(ResolvedVariable), [INFO] [stdout] | | -------------------------- the largest variant contains at least 1744 bytes [INFO] [stdout] 138 | | Struct(ResolvedStruct), [INFO] [stdout] | | ---------------------- the second-largest variant contains at least 288 bytes [INFO] [stdout] 139 | | Enum(ResolvedEnum), [INFO] [stdout] ... | [INFO] [stdout] 142 | | Union(ResolvedUnion), [INFO] [stdout] 143 | | } [INFO] [stdout] | |_^ the entire enum is at least 1744 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] 137 - Variable(ResolvedVariable), [INFO] [stdout] 137 + Variable(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2483:87 [INFO] [stdout] | [INFO] [stdout] 2483 | let typed_var = self.declare_local_variable(module_id, scope.clone(), &variable)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `variable` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2502:46 [INFO] [stdout] | [INFO] [stdout] 2502 | loc: SourceLoc::from_loc(return_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `return_stmt.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:2512:89 [INFO] [stdout] | [INFO] [stdout] 2512 | Some(self.declare_local_variable(module_id, Rc::clone(&body_scope), &variable)?) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `variable` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2529:100 [INFO] [stdout] | [INFO] [stdout] 2529 | let body = Box::new(self.resolve_block_stmt(body_scope_id, Rc::clone(&body_scope), &*for_stmt.body)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `&for_stmt.body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2536:46 [INFO] [stdout] | [INFO] [stdout] 2536 | loc: SourceLoc::from_loc(for_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `for_stmt.loc` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2547:93 [INFO] [stdout] | [INFO] [stdout] 2547 | Box::new(self.resolve_block_stmt(body_scope_id, Rc::clone(&body_scope), &*while_stmt.body)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `&while_stmt.body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2552:46 [INFO] [stdout] | [INFO] [stdout] 2552 | loc: SourceLoc::from_loc(while_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `while_stmt.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:2569:104 [INFO] [stdout] | [INFO] [stdout] 2569 | ... let typed_expr = self.resolve_expr(module_id, Some(Rc::clone(&scope)), &expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2588:70 [INFO] [stdout] | [INFO] [stdout] 2588 | ... loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2596:57 [INFO] [stdout] | [INFO] [stdout] 2596 | ... SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2620:61 [INFO] [stdout] | [INFO] [stdout] 2620 | ... ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2630:74 [INFO] [stdout] | [INFO] [stdout] 2630 | ... loc: SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2634:57 [INFO] [stdout] | [INFO] [stdout] 2634 | ... SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2645:62 [INFO] [stdout] | [INFO] [stdout] 2645 | ... loc: SourceLoc::from_loc(range.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `range.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2659:50 [INFO] [stdout] | [INFO] [stdout] 2659 | loc: SourceLoc::from_loc(case.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `case.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:2669:85 [INFO] [stdout] | [INFO] [stdout] 2669 | Some(self.resolve_block_stmt(body_scope_id, body_scope.clone(), &default_case)?) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `default_case` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2678:46 [INFO] [stdout] | [INFO] [stdout] 2678 | loc: SourceLoc::from_loc(switch.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `switch.loc` [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] [stderr] Checking serde v1.0.228 [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2710:42 [INFO] [stdout] | [INFO] [stdout] 2710 | loc: SourceLoc::from_loc(break_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `break_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2713:42 [INFO] [stdout] | [INFO] [stdout] 2713 | loc: SourceLoc::from_loc(continue_stmt.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `continue_stmt.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:2716:92 [INFO] [stdout] | [INFO] [stdout] 2716 | let typed_stmt = self.resolve_typedef_stmt(module_id, Some(scope.clone()), &typedef)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `typedef` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2740:38 [INFO] [stdout] | [INFO] [stdout] 2740 | loc: SourceLoc::from_loc(goto.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `goto.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2755:25 [INFO] [stdout] | [INFO] [stdout] 2755 | label.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `label.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2774:38 [INFO] [stdout] | [INFO] [stdout] 2774 | loc: SourceLoc::from_loc(label.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `label.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2801:17 [INFO] [stdout] | [INFO] [stdout] 2801 | ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2823:25 [INFO] [stdout] | [INFO] [stdout] 2823 | ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2833:25 [INFO] [stdout] | [INFO] [stdout] 2833 | module_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2847:21 [INFO] [stdout] | [INFO] [stdout] 2847 | module_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2877:21 [INFO] [stdout] | [INFO] [stdout] 2877 | module_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2893:21 [INFO] [stdout] | [INFO] [stdout] 2893 | module_import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2911:39 [INFO] [stdout] | [INFO] [stdout] 2911 | let loc = SourceLoc::from_loc(ident.loc.clone(), self.current_file_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2933:45 [INFO] [stdout] | [INFO] [stdout] 2933 | SourceLoc::from_loc(module_import.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:2937:46 [INFO] [stdout] | [INFO] [stdout] 2937 | loc: SourceLoc::from_loc(module_import.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `module_import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3002:38 [INFO] [stdout] | [INFO] [stdout] 3002 | loc: SourceLoc::from_loc(unnamed_union_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3009:38 [INFO] [stdout] | [INFO] [stdout] 3009 | loc: SourceLoc::from_loc(unnamed_union_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3038:42 [INFO] [stdout] | [INFO] [stdout] 3038 | loc: SourceLoc::from_loc(unnamed_enum_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3042:38 [INFO] [stdout] | [INFO] [stdout] 3042 | loc: SourceLoc::from_loc(unnamed_enum_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3059:42 [INFO] [stdout] | [INFO] [stdout] 3059 | loc: SourceLoc::from_loc(dynamic_expr.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `dynamic_expr.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3063:38 [INFO] [stdout] | [INFO] [stdout] 3063 | loc: SourceLoc::from_loc(dynamic_expr.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `dynamic_expr.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3079:42 [INFO] [stdout] | [INFO] [stdout] 3079 | loc: SourceLoc::from_loc(tuple_member_access.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_member_access.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3083:38 [INFO] [stdout] | [INFO] [stdout] 3083 | loc: SourceLoc::from_loc(tuple_member_access.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_member_access.loc` [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:247:63 [INFO] [stdout] | [INFO] [stdout] 247 | LocalOrGlobalSymbol::LocalSymbol(local_symbol) => match local_symbol.kind { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 248 | | LocalSymbolKind::Variable(..) => true, [INFO] [stdout] 249 | | _ => false, [INFO] [stdout] 250 | | }, [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] 247 - LocalOrGlobalSymbol::LocalSymbol(local_symbol) => match local_symbol.kind { [INFO] [stdout] 248 - LocalSymbolKind::Variable(..) => true, [INFO] [stdout] 249 - _ => false, [INFO] [stdout] 250 - }, [INFO] [stdout] 247 + LocalOrGlobalSymbol::LocalSymbol(local_symbol) => matches!(local_symbol.kind, LocalSymbolKind::Variable(..)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3105:42 [INFO] [stdout] | [INFO] [stdout] 3105 | loc: SourceLoc::from_loc(tuple_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_value.loc` [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:251:64 [INFO] [stdout] | [INFO] [stdout] 251 | LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => match symbol_entry.kind { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 252 | | SymbolEntryKind::GlobalVar(..) => true, [INFO] [stdout] 253 | | _ => false, [INFO] [stdout] 254 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 251 - LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => match symbol_entry.kind { [INFO] [stdout] 252 - SymbolEntryKind::GlobalVar(..) => true, [INFO] [stdout] 253 - _ => false, [INFO] [stdout] 254 - }, [INFO] [stdout] 251 + LocalOrGlobalSymbol::GlobalSymbol(symbol_entry) => matches!(symbol_entry.kind, SymbolEntryKind::GlobalVar(..)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3109:38 [INFO] [stdout] | [INFO] [stdout] 3109 | loc: SourceLoc::from_loc(tuple_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3130:13 [INFO] [stdout] | [INFO] [stdout] 3130 | lambda.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lambda.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3134:39 [INFO] [stdout] | [INFO] [stdout] 3134 | let loc = SourceLoc::from_loc(lambda.loc.clone(), self.current_file_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lambda.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3164:17 [INFO] [stdout] | [INFO] [stdout] 3164 | field_access.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field_access.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3178:42 [INFO] [stdout] | [INFO] [stdout] 3178 | loc: SourceLoc::from_loc(field_access.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field_access.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3182:38 [INFO] [stdout] | [INFO] [stdout] 3182 | loc: SourceLoc::from_loc(field_access.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field_access.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3206:17 [INFO] [stdout] | [INFO] [stdout] 3206 | method_call.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `method_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3223:42 [INFO] [stdout] | [INFO] [stdout] 3223 | loc: SourceLoc::from_loc(method_call.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `method_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3228:38 [INFO] [stdout] | [INFO] [stdout] 3228 | loc: SourceLoc::from_loc(method_call.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `method_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3248:50 [INFO] [stdout] | [INFO] [stdout] 3248 | loc: SourceLoc::from_loc(field_init.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field_init.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3259:17 [INFO] [stdout] | [INFO] [stdout] 3259 | struct_init.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_init.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3270:42 [INFO] [stdout] | [INFO] [stdout] 3270 | loc: SourceLoc::from_loc(struct_init.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_init.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3274:38 [INFO] [stdout] | [INFO] [stdout] 3274 | loc: SourceLoc::from_loc(struct_init.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_init.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3284:47 [INFO] [stdout] | [INFO] [stdout] 3284 | if is_unscoped_expr!(self, scope_opt, func_call.loc.clone(), func_call.span.end) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3302:17 [INFO] [stdout] | [INFO] [stdout] 3302 | func_call.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3314:42 [INFO] [stdout] | [INFO] [stdout] 3314 | loc: SourceLoc::from_loc(func_call.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3318:38 [INFO] [stdout] | [INFO] [stdout] 3318 | loc: SourceLoc::from_loc(func_call.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_call.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3338:42 [INFO] [stdout] | [INFO] [stdout] 3338 | loc: SourceLoc::from_loc(untyped_array.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `untyped_array.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3342:38 [INFO] [stdout] | [INFO] [stdout] 3342 | loc: SourceLoc::from_loc(untyped_array.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `untyped_array.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3357:13 [INFO] [stdout] | [INFO] [stdout] 3357 | arr.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arr.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3371:42 [INFO] [stdout] | [INFO] [stdout] 3371 | loc: SourceLoc::from_loc(arr.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arr.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3375:38 [INFO] [stdout] | [INFO] [stdout] 3375 | loc: SourceLoc::from_loc(arr.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arr.loc` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3385:67 [INFO] [stdout] | [INFO] [stdout] 3385 | let lhs = self.resolve_expr(module_id, scope_opt.clone(), &*bin.lhs)?; [INFO] [stdout] | ^^^^^^^^^ help: try: `&bin.lhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3386:59 [INFO] [stdout] | [INFO] [stdout] 3386 | let rhs = self.resolve_expr(module_id, scope_opt, &*bin.rhs)?; [INFO] [stdout] | ^^^^^^^^^ help: try: `&bin.rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3393:42 [INFO] [stdout] | [INFO] [stdout] 3393 | loc: SourceLoc::from_loc(bin.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bin.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3397:38 [INFO] [stdout] | [INFO] [stdout] 3397 | loc: SourceLoc::from_loc(bin.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bin.loc` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3407:63 [INFO] [stdout] | [INFO] [stdout] 3407 | let operand = self.resolve_expr(module_id, scope_opt, &*prefix.operand)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&prefix.operand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3413:42 [INFO] [stdout] | [INFO] [stdout] 3413 | loc: SourceLoc::from_loc(prefix.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `prefix.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3417:38 [INFO] [stdout] | [INFO] [stdout] 3417 | loc: SourceLoc::from_loc(prefix.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `prefix.loc` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3427:71 [INFO] [stdout] | [INFO] [stdout] 3427 | let operand = self.resolve_expr(module_id, scope_opt.clone(), &*cast.expr)?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&cast.expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3434:13 [INFO] [stdout] | [INFO] [stdout] 3434 | cast.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cast.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3442:42 [INFO] [stdout] | [INFO] [stdout] 3442 | loc: SourceLoc::from_loc(cast.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cast.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3446:38 [INFO] [stdout] | [INFO] [stdout] 3446 | loc: SourceLoc::from_loc(cast.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cast.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:3459:85 [INFO] [stdout] | [INFO] [stdout] 3459 | TypeSpecifier::Ident(ident) => self.resolve_ident(scope_opt, module_id, &ident)?, [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3469:21 [INFO] [stdout] | [INFO] [stdout] 3469 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3506:42 [INFO] [stdout] | [INFO] [stdout] 3506 | loc: SourceLoc::from_loc(assignment.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `assignment.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3510:38 [INFO] [stdout] | [INFO] [stdout] 3510 | loc: SourceLoc::from_loc(assignment.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `assignment.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3525:37 [INFO] [stdout] | [INFO] [stdout] 3525 | ... literal.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `literal.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3547:58 [INFO] [stdout] | [INFO] [stdout] 3547 | ... loc: SourceLoc::from_loc(literal.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `literal.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3570:38 [INFO] [stdout] | [INFO] [stdout] 3570 | loc: SourceLoc::from_loc(literal.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `literal.loc` [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: deref which would be done by auto-deref [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3587:63 [INFO] [stdout] | [INFO] [stdout] 3587 | let operand = self.resolve_expr(module_id, scope_opt, &*unary.operand)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `&unary.operand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3593:42 [INFO] [stdout] | [INFO] [stdout] 3593 | loc: SourceLoc::from_loc(unary.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unary.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3597:38 [INFO] [stdout] | [INFO] [stdout] 3597 | loc: SourceLoc::from_loc(unary.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unary.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3614:42 [INFO] [stdout] | [INFO] [stdout] 3614 | loc: SourceLoc::from_loc(array_index.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_index.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3618:38 [INFO] [stdout] | [INFO] [stdout] 3618 | loc: SourceLoc::from_loc(array_index.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_index.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3633:42 [INFO] [stdout] | [INFO] [stdout] 3633 | loc: SourceLoc::from_loc(address_of.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `address_of.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3637:38 [INFO] [stdout] | [INFO] [stdout] 3637 | loc: SourceLoc::from_loc(address_of.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `address_of.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3652:42 [INFO] [stdout] | [INFO] [stdout] 3652 | loc: SourceLoc::from_loc(dereference.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `dereference.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3656:38 [INFO] [stdout] | [INFO] [stdout] 3656 | loc: SourceLoc::from_loc(dereference.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `dereference.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3675:21 [INFO] [stdout] | [INFO] [stdout] 3675 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3694:42 [INFO] [stdout] | [INFO] [stdout] 3694 | loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3704:42 [INFO] [stdout] | [INFO] [stdout] 3704 | loc: SourceLoc::from_loc(unnamed_struct_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_struct_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3708:38 [INFO] [stdout] | [INFO] [stdout] 3708 | loc: SourceLoc::from_loc(unnamed_struct_value.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_struct_value.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3723:42 [INFO] [stdout] | [INFO] [stdout] 3723 | loc: SourceLoc::from_loc(size_of_expression.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `size_of_expression.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3727:38 [INFO] [stdout] | [INFO] [stdout] 3727 | loc: SourceLoc::from_loc(size_of_expression.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `size_of_expression.loc` [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: manual implementation of `Option::map` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3769:29 [INFO] [stdout] | [INFO] [stdout] 3769 | let module_id_opt = match file_paths.iter().find(|(_, fp)| **fp == module_file_path) { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 3770 | | Some((module_id, _)) => Some(*module_id), [INFO] [stdout] 3771 | | None => None, [INFO] [stdout] 3772 | | }; [INFO] [stdout] | |_________^ help: try: `file_paths.iter().find(|(_, fp)| **fp == module_file_path).map(|(module_id, _)| *module_id)` [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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3811:21 [INFO] [stdout] | [INFO] [stdout] 3811 | ident.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.loc` [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: unnecessary map of the identity function [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3819:69 [INFO] [stdout] | [INFO] [stdout] 3819 | self.resolve_module_import(module_id, module_import.clone()) [INFO] [stdout] | _____________________________________________________________________^ [INFO] [stdout] 3820 | | .map(|symbol_id| symbol_id) [INFO] [stdout] | |_______________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SymbolTable` [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:525:5 [INFO] [stdout] | [INFO] [stdout] 525 | / pub fn new() -> Self { [INFO] [stdout] 526 | | Self { [INFO] [stdout] 527 | | entries: HashMap::new(), [INFO] [stdout] 528 | | names: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 531 | | } [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] 524 + impl Default for SymbolTable { [INFO] [stdout] 525 + fn default() -> Self { [INFO] [stdout] 526 + Self::new() [INFO] [stdout] 527 + } [INFO] [stdout] 528 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3843:25 [INFO] [stdout] | [INFO] [stdout] 3843 | let file_path = match file_paths.get(&module_id) { [INFO] [stdout] | _________________________^ [INFO] [stdout] 3844 | | Some(module_file_path) => Some(module_file_path.clone()), [INFO] [stdout] 3845 | | None => None, [INFO] [stdout] 3846 | | }; [INFO] [stdout] | |_________^ help: try: `file_paths.get(&module_id).map(|module_file_path| module_file_path.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Visiting` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:3876:5 [INFO] [stdout] | [INFO] [stdout] 3876 | / pub fn new() -> Self { [INFO] [stdout] 3877 | | Self { [INFO] [stdout] 3878 | | active: HashSet::new(), [INFO] [stdout] 3879 | | done: HashSet::new(), [INFO] [stdout] 3880 | | } [INFO] [stdout] 3881 | | } [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] 3875 + impl Default for Visiting { [INFO] [stdout] 3876 + fn default() -> Self { [INFO] [stdout] 3877 + Self::new() [INFO] [stdout] 3878 + } [INFO] [stdout] 3879 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:541:53 [INFO] [stdout] | [INFO] [stdout] 541 | SymbolEntryKind::Func(resolved_func) => resolved_func.func_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_func.func_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:542:59 [INFO] [stdout] | [INFO] [stdout] 542 | SymbolEntryKind::Typedef(resolved_typedef) => resolved_typedef.typedef_sig.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_typedef.typedef_sig.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:543:64 [INFO] [stdout] | [INFO] [stdout] 543 | SymbolEntryKind::GlobalVar(resolved_global_var) => resolved_global_var.global_var_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_global_var.global_var_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:544:57 [INFO] [stdout] | [INFO] [stdout] 544 | SymbolEntryKind::Struct(resolved_struct) => resolved_struct.struct_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_struct.struct_sig.modifiers.vis` [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] [stderr] Checking cyrusc_sema v0.1.0 (/opt/rustwide/workdir/crates/cyrusc_sema) [INFO] [stdout] warning: using `clone` on type `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:545:53 [INFO] [stdout] | [INFO] [stdout] 545 | SymbolEntryKind::Enum(resolved_enum) => resolved_enum.enum_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_enum.enum_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:546:63 [INFO] [stdout] | [INFO] [stdout] 546 | SymbolEntryKind::Interface(resolved_interface) => resolved_interface.interface_sig.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_interface.interface_sig.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:547:57 [INFO] [stdout] | [INFO] [stdout] 547 | SymbolEntryKind::Method(resolved_method) => resolved_method.func_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_method.func_sig.modifiers.vis` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/symbols.rs:548:55 [INFO] [stdout] | [INFO] [stdout] 548 | SymbolEntryKind::Union(resolved_union) => resolved_union.union_sig.modifiers.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `resolved_union.union_sig.modifiers.vis` [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 `u32` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/utility.rs:78:52 [INFO] [stdout] | [INFO] [stdout] 78 | let entry = self.resolve_global_symbol(symbol_id.clone())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `symbol_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 `if` statement can be collapsed [INFO] [stdout] --> crates/cyrusc_resolver/src/utility.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(scope) = scope_opt { [INFO] [stdout] 200 | | if let Some(local_symbol) = self.resolve_symbol_from_local_scope(scope, symbol_id) { [INFO] [stdout] 201 | | return Some(LocalOrGlobalSymbol::LocalSymbol(local_symbol)); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if let Some(scope) = scope_opt [INFO] [stdout] 200 ~ && let Some(local_symbol) = self.resolve_symbol_from_local_scope(scope, symbol_id) { [INFO] [stdout] 201 | return Some(LocalOrGlobalSymbol::LocalSymbol(local_symbol)); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:154:29 [INFO] [stdout] | [INFO] [stdout] 154 | global_symbols: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `Mutex>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:158:28 [INFO] [stdout] | [INFO] [stdout] 158 | program_trees: Arc::new(Mutex::new(Vec::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>>` is not `Send` and `Sync` as `Mutex>>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex>>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:214:44 [INFO] [stdout] | [INFO] [stdout] 214 | self.resolve_decl_names(module_id, &ast); [INFO] [stdout] | ^^^^ help: change this to: `ast` [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] --> crates/cyrusc_resolver/src/lib.rs:220:59 [INFO] [stdout] | [INFO] [stdout] 220 | self.resolve_import(parent_module_id, import, &mut visiting); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `visiting` [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] --> crates/cyrusc_resolver/src/lib.rs:226:62 [INFO] [stdout] | [INFO] [stdout] 226 | let typed_body = self.resolve_definitions(module_id, &ast); [INFO] [stdout] | ^^^^ help: change this to: `ast` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:289:25 [INFO] [stdout] | [INFO] [stdout] 289 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:303:64 [INFO] [stdout] | [INFO] [stdout] 303 | global_symbols.entry(module_id).or_insert_with(|| SymbolTable::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SymbolTable::new` [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: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:322:25 [INFO] [stdout] | [INFO] [stdout] 322 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:343:29 [INFO] [stdout] | [INFO] [stdout] 343 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:361:29 [INFO] [stdout] | [INFO] [stdout] 361 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:370:21 [INFO] [stdout] | [INFO] [stdout] 370 | &loaded_module.program.as_ref(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `loaded_module.program.as_ref()` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:403:33 [INFO] [stdout] | [INFO] [stdout] 403 | ... import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:421:25 [INFO] [stdout] | [INFO] [stdout] 421 | import.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `import.loc` [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: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/cli.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | let monomorph_registry = Arc::new(Mutex::new(MonomorphRegistry::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `Mutex` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:450:25 [INFO] [stdout] | [INFO] [stdout] 450 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:464:72 [INFO] [stdout] | [INFO] [stdout] 464 | self.check_import_single_vis(actual_name.clone(), vis, loc.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:480:29 [INFO] [stdout] | [INFO] [stdout] 480 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:541:25 [INFO] [stdout] | [INFO] [stdout] 541 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:557:25 [INFO] [stdout] | [INFO] [stdout] 557 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:563:50 [INFO] [stdout] | [INFO] [stdout] 563 | loc: SourceLoc::from_loc(key.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `key.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:585:37 [INFO] [stdout] | [INFO] [stdout] 585 | ... generic_param.param_name.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:603:25 [INFO] [stdout] | [INFO] [stdout] 603 | generic_param.param_name.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:614:50 [INFO] [stdout] | [INFO] [stdout] 614 | loc: SourceLoc::from_loc(generic_param.param_name.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_param.param_name.loc` [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 `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:633:17 [INFO] [stdout] | [INFO] [stdout] 633 | / generic_params [INFO] [stdout] 634 | | .list [INFO] [stdout] 635 | | .iter() [INFO] [stdout] 636 | | .find(|param| param.param_name.name == ident.as_string()) [INFO] [stdout] 637 | | .and_then(|generic_param| Some(SemanticType::GenericParam(generic_param.clone()))) [INFO] [stdout] | |______________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 633 ~ generic_params [INFO] [stdout] 634 + .list [INFO] [stdout] 635 + .iter() [INFO] [stdout] 636 + .find(|param| param.param_name.name == ident.as_string()).map(|generic_param| SemanticType::GenericParam(generic_param.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:664:21 [INFO] [stdout] | [INFO] [stdout] 664 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:675:25 [INFO] [stdout] | [INFO] [stdout] 675 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:686:50 [INFO] [stdout] | [INFO] [stdout] 686 | loc: SourceLoc::from_loc(generic_inst.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `generic_inst.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:704:29 [INFO] [stdout] | [INFO] [stdout] 704 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:712:46 [INFO] [stdout] | [INFO] [stdout] 712 | loc: SourceLoc::from_loc(tuple_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tuple_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:726:29 [INFO] [stdout] | [INFO] [stdout] 726 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:742:29 [INFO] [stdout] | [INFO] [stdout] 742 | ... loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:755:21 [INFO] [stdout] | [INFO] [stdout] 755 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:765:46 [INFO] [stdout] | [INFO] [stdout] 765 | loc: SourceLoc::from_loc(loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:779:21 [INFO] [stdout] | [INFO] [stdout] 779 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:790:21 [INFO] [stdout] | [INFO] [stdout] 790 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:801:21 [INFO] [stdout] | [INFO] [stdout] 801 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:826:46 [INFO] [stdout] | [INFO] [stdout] 826 | loc: SourceLoc::from_loc(loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:838:25 [INFO] [stdout] | [INFO] [stdout] 838 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:844:54 [INFO] [stdout] | [INFO] [stdout] 844 | ... loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:851:46 [INFO] [stdout] | [INFO] [stdout] 851 | loc: SourceLoc::from_loc(unnamed_union_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_union_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:879:37 [INFO] [stdout] | [INFO] [stdout] 879 | ... valued_field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:886:49 [INFO] [stdout] | [INFO] [stdout] 886 | ... valued_field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valued_field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:902:46 [INFO] [stdout] | [INFO] [stdout] 902 | loc: SourceLoc::from_loc(unnamed_enum_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unnamed_enum_type.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:914:25 [INFO] [stdout] | [INFO] [stdout] 914 | field.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:920:54 [INFO] [stdout] | [INFO] [stdout] 920 | ... loc: SourceLoc::from_loc(field.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:928:46 [INFO] [stdout] | [INFO] [stdout] 928 | loc: SourceLoc::from_loc(struct_spec.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_spec.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:961:42 [INFO] [stdout] | [INFO] [stdout] 961 | loc: SourceLoc::from_loc(self_type.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self_type.loc` [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] --> crates/cyrusc_resolver/src/lib.rs:987:29 [INFO] [stdout] | [INFO] [stdout] 987 | .unwrap_or_else(|| generate_symbol_id()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `generate_symbol_id` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:999:13 [INFO] [stdout] | [INFO] [stdout] 999 | typedef.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1007:18 [INFO] [stdout] | [INFO] [stdout] 1007 | vis: typedef.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.vis` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1008:38 [INFO] [stdout] | [INFO] [stdout] 1008 | loc: SourceLoc::from_loc(typedef.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Visibility` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1040:18 [INFO] [stdout] | [INFO] [stdout] 1040 | vis: typedef.vis.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.vis` [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: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> crates/cyrusc_resolver/src/cli.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | let monomorph_registry = Arc::new(Mutex::new(MonomorphRegistry::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `Mutex` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Mutex` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1052:65 [INFO] [stdout] | [INFO] [stdout] 1052 | fn insert_symbol_name(&mut self, module_id: ModuleID, name: &String) -> SymbolID { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1052 ~ fn insert_symbol_name(&mut self, module_id: ModuleID, name: &str) -> SymbolID { [INFO] [stdout] 1053 | let symbol_id = generate_symbol_id(); [INFO] [stdout] 1054 | let mut global_symbols = self.global_symbols.lock().unwrap(); [INFO] [stdout] 1055 | let symbol_table = global_symbols.get_mut(&module_id).unwrap(); [INFO] [stdout] 1056 ~ symbol_table.names.insert(name.to_owned(), symbol_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1070:45 [INFO] [stdout] | [INFO] [stdout] 1070 | SourceLoc::from_loc(interface.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `interface.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1081:45 [INFO] [stdout] | [INFO] [stdout] 1081 | SourceLoc::from_loc(union_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `union_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1092:45 [INFO] [stdout] | [INFO] [stdout] 1092 | SourceLoc::from_loc(typedef.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `typedef.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1103:45 [INFO] [stdout] | [INFO] [stdout] 1103 | SourceLoc::from_loc(func_def.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_def.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1114:45 [INFO] [stdout] | [INFO] [stdout] 1114 | SourceLoc::from_loc(func_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1125:45 [INFO] [stdout] | [INFO] [stdout] 1125 | SourceLoc::from_loc(global_variable.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `global_variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1136:45 [INFO] [stdout] | [INFO] [stdout] 1136 | SourceLoc::from_loc(struct_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `struct_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1147:45 [INFO] [stdout] | [INFO] [stdout] 1147 | SourceLoc::from_loc(enum_decl.loc.clone(), self.current_file_path()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `enum_decl.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1198:69 [INFO] [stdout] | [INFO] [stdout] 1198 | Stmt::Variable(variable) => Err(SourceLoc::from_loc(variable.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variable.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1199:62 [INFO] [stdout] | [INFO] [stdout] 1199 | Stmt::If(if_stmt) => Err(SourceLoc::from_loc(if_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `if_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1201:45 [INFO] [stdout] | [INFO] [stdout] 1201 | Err(SourceLoc::from_loc(return_stmt.loc.clone(), self.current_file_path())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `return_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1203:64 [INFO] [stdout] | [INFO] [stdout] 1203 | Stmt::For(for_stmt) => Err(SourceLoc::from_loc(for_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `for_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1204:67 [INFO] [stdout] | [INFO] [stdout] 1204 | Stmt::Foreach(foreach) => Err(SourceLoc::from_loc(foreach.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `foreach.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1205:65 [INFO] [stdout] | [INFO] [stdout] 1205 | Stmt::Switch(switch) => Err(SourceLoc::from_loc(switch.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `switch.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1207:21 [INFO] [stdout] | [INFO] [stdout] 1207 | block_statement.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_statement.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1210:68 [INFO] [stdout] | [INFO] [stdout] 1210 | Stmt::Break(break_stmt) => Err(SourceLoc::from_loc(break_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `break_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1212:45 [INFO] [stdout] | [INFO] [stdout] 1212 | Err(SourceLoc::from_loc(continue_stmt.loc.clone(), self.current_file_path())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `continue_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1214:63 [INFO] [stdout] | [INFO] [stdout] 1214 | Stmt::Defer(defer) => Err(SourceLoc::from_loc(defer.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `defer.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1215:68 [INFO] [stdout] | [INFO] [stdout] 1215 | Stmt::While(while_stmt) => Err(SourceLoc::from_loc(while_stmt.loc.clone(), self.current_file_path())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `while_stmt.loc` [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 `Location` which implements the `Copy` trait [INFO] [stdout] --> crates/cyrusc_resolver/src/lib.rs:1217:21 [INFO] [stdout] | [WARN] too many lines in the log, truncating it