[INFO] fetching crate lsp-text-document 0.2.0... [INFO] linting lsp-text-document-0.2.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate lsp-text-document 0.2.0 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate lsp-text-document 0.2.0 [INFO] finished tweaking crates.io crate lsp-text-document 0.2.0 [INFO] tweaked toml for crates.io crate lsp-text-document 0.2.0 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate lsp-text-document 0.2.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate lsp-text-document 0.2.0 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] Downloading crates ... [INFO] [stderr] Downloaded serde_repr v0.1.6 [INFO] [stderr] Downloaded tinyvec v0.3.4 [INFO] [stderr] Downloaded unicode-normalization v0.1.13 [INFO] [stderr] Downloaded lsp-types v0.84.0 [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] f75b2047d3bd03cbc7a13c26a3bba3ccedac3e75d6c67dc8427a28e47f91dd52 [INFO] running `Command { std: "docker" "start" "-a" "f75b2047d3bd03cbc7a13c26a3bba3ccedac3e75d6c67dc8427a28e47f91dd52", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f75b2047d3bd03cbc7a13c26a3bba3ccedac3e75d6c67dc8427a28e47f91dd52", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f75b2047d3bd03cbc7a13c26a3bba3ccedac3e75d6c67dc8427a28e47f91dd52", kill_on_drop: false }` [INFO] [stdout] f75b2047d3bd03cbc7a13c26a3bba3ccedac3e75d6c67dc8427a28e47f91dd52 [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] 514ae7658f0478edbe752b6da024ad7ee163286f0daaf96845cfa22df196e964 [INFO] running `Command { std: "docker" "start" "-a" "514ae7658f0478edbe752b6da024ad7ee163286f0daaf96845cfa22df196e964", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.24 [INFO] [stderr] Compiling syn v1.0.48 [INFO] [stderr] Compiling serde_derive v1.0.117 [INFO] [stderr] Compiling serde v1.0.117 [INFO] [stderr] Checking tinyvec v0.3.4 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Checking percent-encoding v2.1.0 [INFO] [stderr] Compiling serde_json v1.0.59 [INFO] [stderr] Checking itoa v0.4.6 [INFO] [stderr] Checking form_urlencoded v1.0.0 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Checking unicode-normalization v0.1.13 [INFO] [stderr] Checking idna v0.2.0 [INFO] [stderr] Compiling serde_repr v0.1.6 [INFO] [stderr] Checking url v2.2.0 [INFO] [stderr] Checking lsp-types v0.84.0 [INFO] [stderr] Checking lsp-text-document v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `macros::*` [INFO] [stdout] --> src/lib.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub use macros::*; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macros::*` [INFO] [stdout] --> src/lib.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub use macros::*; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `line_offsets` [INFO] [stdout] --> src/document.rs:75:30 [INFO] [stdout] | [INFO] [stdout] 75 | for i in start_line + 1 + add_line_offsets_len..line_offsets.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 75 - for i in start_line + 1 + add_line_offsets_len..line_offsets.len() { [INFO] [stdout] 75 + for in line_offsets.iter_mut().skip(start_line + 1 + add_line_offsets_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/document.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let end_byte = (&self.text[start_offset..end_offset]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.text[start_offset..end_offset]` [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: unneeded `return` statement [INFO] [stdout] --> src/document.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | / return Position { [INFO] [stdout] 122 | | line, [INFO] [stdout] 123 | | character: offset - line_offsets[line as usize] as u32, [INFO] [stdout] 124 | | }; [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] 121 ~ Position { [INFO] [stdout] 122 + line, [INFO] [stdout] 123 + character: offset - line_offsets[line as usize] as u32, [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `offset.min(self.text.len() as u32)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> src/document.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | offset = offset.min(self.text.len() as u32).max(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `offset.min(self.text.len() as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/document.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | !event.range_length.is_some() && !event.range.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `event.range_length.is_none()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/document.rs:147:42 [INFO] [stdout] | [INFO] [stdout] 147 | !event.range_length.is_some() && !event.range.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `event.range.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/document.rs:178:11 [INFO] [stdout] | [INFO] [stdout] 178 | text: &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] 178 - text: &String, [INFO] [stdout] 178 + text: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/document.rs:182:23 [INFO] [stdout] | [INFO] [stdout] 182 | let text_offset = if let Some(offset) = text_offset { [INFO] [stdout] | _______________________^ [INFO] [stdout] 183 | | offset [INFO] [stdout] 184 | | } else { [INFO] [stdout] 185 | | 0 [INFO] [stdout] 186 | | }; [INFO] [stdout] | |_____^ help: replace it with: `text_offset.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `line_offsets` [INFO] [stdout] --> src/document.rs:75:30 [INFO] [stdout] | [INFO] [stdout] 75 | for i in start_line + 1 + add_line_offsets_len..line_offsets.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 75 - for i in start_line + 1 + add_line_offsets_len..line_offsets.len() { [INFO] [stdout] 75 + for in line_offsets.iter_mut().skip(start_line + 1 + add_line_offsets_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/document.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let end_byte = (&self.text[start_offset..end_offset]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.text[start_offset..end_offset]` [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: unneeded `return` statement [INFO] [stdout] --> src/document.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | / return Position { [INFO] [stdout] 122 | | line, [INFO] [stdout] 123 | | character: offset - line_offsets[line as usize] as u32, [INFO] [stdout] 124 | | }; [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] 121 ~ Position { [INFO] [stdout] 122 + line, [INFO] [stdout] 123 + character: offset - line_offsets[line as usize] as u32, [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `offset.min(self.text.len() as u32)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> src/document.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | offset = offset.min(self.text.len() as u32).max(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `offset.min(self.text.len() as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/document.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | !event.range_length.is_some() && !event.range.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `event.range_length.is_none()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/document.rs:147:42 [INFO] [stdout] | [INFO] [stdout] 147 | !event.range_length.is_some() && !event.range.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `event.range.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/document.rs:178:11 [INFO] [stdout] | [INFO] [stdout] 178 | text: &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] 178 - text: &String, [INFO] [stdout] 178 + text: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/document.rs:182:23 [INFO] [stdout] | [INFO] [stdout] 182 | let text_offset = if let Some(offset) = text_offset { [INFO] [stdout] | _______________________^ [INFO] [stdout] 183 | | offset [INFO] [stdout] 184 | | } else { [INFO] [stdout] 185 | | 0 [INFO] [stdout] 186 | | }; [INFO] [stdout] | |_____^ help: replace it with: `text_offset.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `compute_line_offsets`, `event`, `position`, `range_at`, and `range` [INFO] [stdout] --> src/main.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | use lsp_text_document::{compute_line_offsets, event, position, range, range_at, FullTextDocument}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Position` [INFO] [stdout] --> src/main.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | use lsp_types::{Position, Url}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | for i in 0..100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | let end_byte = (&string[s..e]) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `string[s..e]` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/main.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | assert!(&first_another == &_another); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 52 - assert!(&first_another == &_another); [INFO] [stdout] 52 + assert!(first_another == _another); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `compute_line_offsets`, `event`, `position`, `range_at`, and `range` [INFO] [stdout] --> src/main.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | use lsp_text_document::{compute_line_offsets, event, position, range, range_at, FullTextDocument}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Position` [INFO] [stdout] --> src/main.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | use lsp_types::{Position, Url}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | for i in 0..100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | let end_byte = (&string[s..e]) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `string[s..e]` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/main.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | assert!(&first_another == &_another); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 52 - assert!(&first_another == &_another); [INFO] [stdout] 52 + assert!(first_another == _another); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TextDocumentContentChangeEvent` [INFO] [stdout] --> tests/document.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | use lsp_types::{TextDocumentContentChangeEvent, Url}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Range` [INFO] [stdout] --> tests/document.rs:162:31 [INFO] [stdout] | [INFO] [stdout] 162 | use lsp_types::{Position, Range, TextDocumentContentChangeEvent}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `InsertPosition` is never used [INFO] [stdout] --> tests/document.rs:8:6 [INFO] [stdout] | [INFO] [stdout] 8 | enum InsertPosition { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.69s [INFO] running `Command { std: "docker" "inspect" "514ae7658f0478edbe752b6da024ad7ee163286f0daaf96845cfa22df196e964", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "514ae7658f0478edbe752b6da024ad7ee163286f0daaf96845cfa22df196e964", kill_on_drop: false }` [INFO] [stdout] 514ae7658f0478edbe752b6da024ad7ee163286f0daaf96845cfa22df196e964