[INFO] fetching crate pulldown-cmark 0.13.1... [INFO] linting pulldown-cmark-0.13.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate pulldown-cmark 0.13.1 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate pulldown-cmark 0.13.1 [INFO] removed 0 missing examples [INFO] finished tweaking crates.io crate pulldown-cmark 0.13.1 [INFO] tweaked toml for crates.io crate pulldown-cmark 0.13.1 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate pulldown-cmark 0.13.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate pulldown-cmark 0.13.1 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 586e04fa5cb371615b0cc3af38e46e3a9e3eb8f5268aa3fd83dee5447fddcd87 [INFO] running `Command { std: "docker" "start" "-a" "586e04fa5cb371615b0cc3af38e46e3a9e3eb8f5268aa3fd83dee5447fddcd87", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "586e04fa5cb371615b0cc3af38e46e3a9e3eb8f5268aa3fd83dee5447fddcd87", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "586e04fa5cb371615b0cc3af38e46e3a9e3eb8f5268aa3fd83dee5447fddcd87", kill_on_drop: false }` [INFO] [stdout] 586e04fa5cb371615b0cc3af38e46e3a9e3eb8f5268aa3fd83dee5447fddcd87 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 59e723f9f0d6606434ff983371bc114468449963d3736ec39cf0fb0766ccf5ff [INFO] running `Command { std: "docker" "start" "-a" "59e723f9f0d6606434ff983371bc114468449963d3736ec39cf0fb0766ccf5ff", kill_on_drop: false }` [INFO] [stderr] Compiling pulldown-cmark v0.13.1 (/opt/rustwide/workdir) [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking pulldown-cmark-escape v0.11.0 [INFO] [stderr] Checking regex-syntax v0.8.9 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stdout] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stdout] --> src/lib.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: requested on the command line with `-W unexpected-cfgs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stdout] --> src/lib.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/firstpass.rs:2379:22 [INFO] [stdout] | [INFO] [stdout] 2379 | for &byte in &[b'.', b'-', b'"', b'\''] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b".-\"'"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/lib.rs:636:1 [INFO] [stdout] | [INFO] [stdout] 636 | / #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] [INFO] [stdout] 637 | | [INFO] [stdout] | |_^ [INFO] [stdout] 638 | pub enum Alignment { [INFO] [stdout] | ------------------ the attribute applies to this enum [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | //! Its author authorized the use of this GPL code in this project in [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 5 | //! Its author authorized the use of this GPL code in this project in [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | //! . [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 6 | //! . [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | //! Its author proposed the solution in [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | //! Its author proposed the solution in [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | //! . [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | //! . [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/entities.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | const ENTITIES: [(&[u8], &str); 2125] = [ [INFO] [stdout] | ^---- [INFO] [stdout] | | [INFO] [stdout] | _help: make this a static item: `static` [INFO] [stdout] | | [INFO] [stdout] 26 | | (b"AElig", "\u{00C6}"), [INFO] [stdout] 27 | | (b"AMP", "\u{0026}"), [INFO] [stdout] 28 | | (b"Aacute", "\u{00C1}"), [INFO] [stdout] ... | [INFO] [stdout] 2150 | | (b"zwnj", "\u{200C}"), [INFO] [stdout] 2151 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] = note: `#[warn(clippy::large_const_arrays)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/firstpass.rs:935:40 [INFO] [stdout] | [INFO] [stdout] 935 | let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 935 - let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] 935 + let is_valid_seq = !(c == b'~' && count > 2 && count != 2); [INFO] [stdout] | [INFO] [stdout] 935 - let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] 935 + let is_valid_seq = c != b'~' || count <= 2 || count == 2; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `bytes.get(0)` [INFO] [stdout] --> src/firstpass.rs:1768:12 [INFO] [stdout] | [INFO] [stdout] 1768 | if bytes.get(0) != Some(&b'[') { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `bytes.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: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2134:12 [INFO] [stdout] | [INFO] [stdout] 2134 | || scan_listitem(bytes).map_or(false, |(ix, delim, index, _)| { [INFO] [stdout] | ____________^ [INFO] [stdout] 2135 | | ! current_container || [INFO] [stdout] 2136 | | tree.is_in_table() || [INFO] [stdout] ... | [INFO] [stdout] 2140 | | && (scan_blank_line(&bytes[ix..]).is_none()) [INFO] [stdout] 2141 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2134 - || scan_listitem(bytes).map_or(false, |(ix, delim, index, _)| { [INFO] [stdout] 2134 + || scan_listitem(bytes).is_some_and(|(ix, delim, index, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2146:20 [INFO] [stdout] | [INFO] [stdout] 2146 | && tree.peek_up().map_or(false, |cur| { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2147 | | matches!( [INFO] [stdout] 2148 | | tree[cur].item.body, [INFO] [stdout] 2149 | | ItemBody::Paragraph [INFO] [stdout] ... | [INFO] [stdout] 2153 | | })) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2146 - && tree.peek_up().map_or(false, |cur| { [INFO] [stdout] 2146 + && tree.peek_up().is_some_and(|cur| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2154:20 [INFO] [stdout] | [INFO] [stdout] 2154 | || tree.walk_spine().nth(tree_position).map_or(false, |cur| { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2155 | | matches!(tree[*cur].item.body, ItemBody::DefinitionListDefinition(_)) [INFO] [stdout] 2156 | | })) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2154 - || tree.walk_spine().nth(tree_position).map_or(false, |cur| { [INFO] [stdout] 2154 + || tree.walk_spine().nth(tree_position).is_some_and(|cur| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2160:16 [INFO] [stdout] | [INFO] [stdout] 2160 | && scan_link_label_rest( [INFO] [stdout] | ________________^ [INFO] [stdout] 2161 | | std::str::from_utf8(&bytes[2..]).unwrap(), [INFO] [stdout] 2162 | | &|_| None, [INFO] [stdout] 2163 | | tree.is_in_table(), [INFO] [stdout] 2164 | | ) [INFO] [stdout] 2165 | | .map_or(false, |(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2165 - .map_or(false, |(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] 2165 + .is_some_and(|(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parse.rs:468:38 [INFO] [stdout] | [INFO] [stdout] 468 | let is_display = self.tree[cur_ix].next.map_or(false, |next_ix| { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 469 | | matches!( [INFO] [stdout] 470 | | self.tree[next_ix].item.body, [INFO] [stdout] 471 | | ItemBody::MaybeMath(_can_open, _can_close, _brace_context) [INFO] [stdout] 472 | | ) [INFO] [stdout] 473 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 468 - let is_display = self.tree[cur_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 468 + let is_display = self.tree[cur_ix].next.is_some_and(|next_ix| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parse.rs:494:37 [INFO] [stdout] | [INFO] [stdout] 494 | / ... self.tree[scan_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 495 | | ... matches!( [INFO] [stdout] 496 | | ... self.tree[next_ix].item.body, [INFO] [stdout] 497 | | ... ItemBody::MaybeMath( [INFO] [stdout] ... | [INFO] [stdout] 503 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 494 - self.tree[scan_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 494 + self.tree[scan_ix].next.is_some_and(|next_ix| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/scanners.rs:494:5 [INFO] [stdout] | [INFO] [stdout] 494 | / match bytes { [INFO] [stdout] 495 | | &[] => Some(0), [INFO] [stdout] 496 | | &[b'\n', ..] => Some(1), [INFO] [stdout] 497 | | &[b'\r', b'\n', ..] => Some(2), [INFO] [stdout] 498 | | &[b'\r', ..] => Some(1), [INFO] [stdout] 499 | | _ => None, [INFO] [stdout] 500 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 494 ~ match *bytes { [INFO] [stdout] 495 ~ [] => Some(0), [INFO] [stdout] 496 ~ [b'\n', ..] => Some(1), [INFO] [stdout] 497 ~ [b'\r', b'\n', ..] => Some(2), [INFO] [stdout] 498 ~ [b'\r', ..] => Some(1), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/scanners.rs:734:16 [INFO] [stdout] | [INFO] [stdout] 734 | if suffix[..(next_line - i)].iter().any(|&b| b == b'`') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `suffix[..(next_line - i)].contains(&b'`')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1028:22 [INFO] [stdout] | [INFO] [stdout] 1028 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1059:22 [INFO] [stdout] | [INFO] [stdout] 1059 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1096:22 [INFO] [stdout] | [INFO] [stdout] 1096 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1119:22 [INFO] [stdout] | [INFO] [stdout] 1119 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1267:22 [INFO] [stdout] | [INFO] [stdout] 1267 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> examples/parser-map-tag-print.rs:45:66 [INFO] [stdout] | [INFO] [stdout] 45 | let parser = Parser::new_ext(markdown_input, Options::all()).map(|event| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 45 ~ let parser = Parser::new_ext(markdown_input, Options::all()).inspect(|event| { [INFO] [stdout] 46 ~ match event { [INFO] [stdout] 47 | Event::Start(tag) => match tag { [INFO] [stdout] ... [INFO] [stdout] 104 | _ => (), [INFO] [stdout] 105 ~ }; [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] --> examples/parser-map-tag-print.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / match &event { [INFO] [stdout] 47 | | Event::Start(tag) => match tag { [INFO] [stdout] 48 | | Tag::HtmlBlock => println!("HtmlBlock"), [INFO] [stdout] 49 | | Tag::Heading { [INFO] [stdout] ... | [INFO] [stdout] 104 | | _ => (), [INFO] [stdout] 105 | | }; [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] 46 ~ if let Event::Start(tag) = &event { match tag { [INFO] [stdout] 47 + Tag::HtmlBlock => println!("HtmlBlock"), [INFO] [stdout] 48 + Tag::Heading { [INFO] [stdout] 49 + level, [INFO] [stdout] 50 + id, [INFO] [stdout] 51 + classes, [INFO] [stdout] 52 + attrs, [INFO] [stdout] 53 + } => println!( [INFO] [stdout] 54 + "Heading heading_level: {} fragment identifier: {:?} classes: {:?} attrs: {:?}", [INFO] [stdout] 55 + level, id, classes, attrs [INFO] [stdout] 56 + ), [INFO] [stdout] 57 + Tag::Paragraph => println!("Paragraph"), [INFO] [stdout] 58 + Tag::List(ordered_list_first_item_number) => println!( [INFO] [stdout] 59 + "List ordered_list_first_item_number: {:?}", [INFO] [stdout] 60 + ordered_list_first_item_number [INFO] [stdout] 61 + ), [INFO] [stdout] 62 + Tag::DefinitionList => println!("Definition list"), [INFO] [stdout] 63 + Tag::DefinitionListTitle => println!("Definition title (definition list item)"), [INFO] [stdout] 64 + Tag::DefinitionListDefinition => println!("Definition (definition list item)"), [INFO] [stdout] 65 + Tag::Item => println!("Item (this is a list item)"), [INFO] [stdout] 66 + Tag::Emphasis => println!("Emphasis (this is a span tag)"), [INFO] [stdout] 67 + Tag::Superscript => println!("Superscript (this is a span tag)"), [INFO] [stdout] 68 + Tag::Subscript => println!("Subscript (this is a span tag)"), [INFO] [stdout] 69 + Tag::Strong => println!("Strong (this is a span tag)"), [INFO] [stdout] 70 + Tag::Strikethrough => println!("Strikethrough (this is a span tag)"), [INFO] [stdout] 71 + Tag::BlockQuote(kind) => println!("BlockQuote ({:?})", kind), [INFO] [stdout] 72 + Tag::CodeBlock(code_block_kind) => { [INFO] [stdout] 73 + println!("CodeBlock code_block_kind: {:?}", code_block_kind) [INFO] [stdout] 74 + } [INFO] [stdout] 75 + Tag::Link { [INFO] [stdout] 76 + link_type, [INFO] [stdout] 77 + dest_url, [INFO] [stdout] 78 + title, [INFO] [stdout] 79 + id, [INFO] [stdout] 80 + } => println!( [INFO] [stdout] 81 + "Link link_type: {:?} url: {} title: {} id: {}", [INFO] [stdout] 82 + link_type, dest_url, title, id [INFO] [stdout] 83 + ), [INFO] [stdout] 84 + Tag::Image { [INFO] [stdout] 85 + link_type, [INFO] [stdout] 86 + dest_url, [INFO] [stdout] 87 + title, [INFO] [stdout] 88 + id, [INFO] [stdout] 89 + } => println!( [INFO] [stdout] 90 + "Image link_type: {:?} url: {} title: {} id: {}", [INFO] [stdout] 91 + link_type, dest_url, title, id [INFO] [stdout] 92 + ), [INFO] [stdout] 93 + Tag::Table(column_text_alignment_list) => println!( [INFO] [stdout] 94 + "Table column_text_alignment_list: {:?}", [INFO] [stdout] 95 + column_text_alignment_list [INFO] [stdout] 96 + ), [INFO] [stdout] 97 + Tag::TableHead => println!("TableHead (contains TableRow tags"), [INFO] [stdout] 98 + Tag::TableRow => println!("TableRow (contains TableCell tags)"), [INFO] [stdout] 99 + Tag::TableCell => println!("TableCell (contains inline tags)"), [INFO] [stdout] 100 + Tag::FootnoteDefinition(label) => println!("FootnoteDefinition label: {}", label), [INFO] [stdout] 101 + Tag::MetadataBlock(kind) => println!("MetadataBlock: {:?}", kind), [INFO] [stdout] 102 ~ } }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> examples/parser-map-event-print.rs:14:46 [INFO] [stdout] | [INFO] [stdout] 14 | let parser = Parser::new(markdown_input).map(|event| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 14 ~ let parser = Parser::new(markdown_input).inspect(|event| { [INFO] [stdout] 15 ~ match event { [INFO] [stdout] 16 | Event::Start(tag) => println!("Start: {:?}", tag), [INFO] [stdout] ... [INFO] [stdout] 28 | Event::Rule => println!("Rule"), [INFO] [stdout] 29 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> examples/event-filter.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | .filter(|event| match event { [INFO] [stdout] | _________________________^ [INFO] [stdout] 17 | | Event::Start(Tag::Image { .. }) | Event::End(TagEnd::Image) => false, [INFO] [stdout] 18 | | _ => true, [INFO] [stdout] 19 | | }); [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] 16 - .filter(|event| match event { [INFO] [stdout] 17 - Event::Start(Tag::Image { .. }) | Event::End(TagEnd::Image) => false, [INFO] [stdout] 18 - _ => true, [INFO] [stdout] 19 - }); [INFO] [stdout] 16 + .filter(|event| !matches!(event, Event::Start(Tag::Image { .. }) | Event::End(TagEnd::Image))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stdout] --> src/lib.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: requested on the command line with `-W unexpected-cfgs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stdout] --> src/lib.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/firstpass.rs:2379:22 [INFO] [stdout] | [INFO] [stdout] 2379 | for &byte in &[b'.', b'-', b'"', b'\''] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b".-\"'"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/lib.rs:636:1 [INFO] [stdout] | [INFO] [stdout] 636 | / #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] [INFO] [stdout] 637 | | [INFO] [stdout] | |_^ [INFO] [stdout] 638 | pub enum Alignment { [INFO] [stdout] | ------------------ the attribute applies to this enum [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | //! Its author authorized the use of this GPL code in this project in [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 5 | //! Its author authorized the use of this GPL code in this project in [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | //! . [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 6 | //! . [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | //! Its author proposed the solution in [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | //! Its author proposed the solution in [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | //! . [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | //! . [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/entities.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | const ENTITIES: [(&[u8], &str); 2125] = [ [INFO] [stdout] | ^---- [INFO] [stdout] | | [INFO] [stdout] | _help: make this a static item: `static` [INFO] [stdout] | | [INFO] [stdout] 26 | | (b"AElig", "\u{00C6}"), [INFO] [stdout] 27 | | (b"AMP", "\u{0026}"), [INFO] [stdout] 28 | | (b"Aacute", "\u{00C1}"), [INFO] [stdout] ... | [INFO] [stdout] 2150 | | (b"zwnj", "\u{200C}"), [INFO] [stdout] 2151 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] = note: `#[warn(clippy::large_const_arrays)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/firstpass.rs:935:40 [INFO] [stdout] | [INFO] [stdout] 935 | let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 935 - let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] 935 + let is_valid_seq = !(c == b'~' && count > 2 && count != 2); [INFO] [stdout] | [INFO] [stdout] 935 - let is_valid_seq = (c != b'~' || count <= 2) || (c == b'~' && count == 2); [INFO] [stdout] 935 + let is_valid_seq = c != b'~' || count <= 2 || count == 2; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `bytes.get(0)` [INFO] [stdout] --> src/firstpass.rs:1768:12 [INFO] [stdout] | [INFO] [stdout] 1768 | if bytes.get(0) != Some(&b'[') { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `bytes.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: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2134:12 [INFO] [stdout] | [INFO] [stdout] 2134 | || scan_listitem(bytes).map_or(false, |(ix, delim, index, _)| { [INFO] [stdout] | ____________^ [INFO] [stdout] 2135 | | ! current_container || [INFO] [stdout] 2136 | | tree.is_in_table() || [INFO] [stdout] ... | [INFO] [stdout] 2140 | | && (scan_blank_line(&bytes[ix..]).is_none()) [INFO] [stdout] 2141 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2134 - || scan_listitem(bytes).map_or(false, |(ix, delim, index, _)| { [INFO] [stdout] 2134 + || scan_listitem(bytes).is_some_and(|(ix, delim, index, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2146:20 [INFO] [stdout] | [INFO] [stdout] 2146 | && tree.peek_up().map_or(false, |cur| { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2147 | | matches!( [INFO] [stdout] 2148 | | tree[cur].item.body, [INFO] [stdout] 2149 | | ItemBody::Paragraph [INFO] [stdout] ... | [INFO] [stdout] 2153 | | })) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2146 - && tree.peek_up().map_or(false, |cur| { [INFO] [stdout] 2146 + && tree.peek_up().is_some_and(|cur| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2154:20 [INFO] [stdout] | [INFO] [stdout] 2154 | || tree.walk_spine().nth(tree_position).map_or(false, |cur| { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2155 | | matches!(tree[*cur].item.body, ItemBody::DefinitionListDefinition(_)) [INFO] [stdout] 2156 | | })) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2154 - || tree.walk_spine().nth(tree_position).map_or(false, |cur| { [INFO] [stdout] 2154 + || tree.walk_spine().nth(tree_position).is_some_and(|cur| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/firstpass.rs:2160:16 [INFO] [stdout] | [INFO] [stdout] 2160 | && scan_link_label_rest( [INFO] [stdout] | ________________^ [INFO] [stdout] 2161 | | std::str::from_utf8(&bytes[2..]).unwrap(), [INFO] [stdout] 2162 | | &|_| None, [INFO] [stdout] 2163 | | tree.is_in_table(), [INFO] [stdout] 2164 | | ) [INFO] [stdout] 2165 | | .map_or(false, |(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2165 - .map_or(false, |(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] 2165 + .is_some_and(|(len, _)| bytes.get(2 + len) == Some(&b':'))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parse.rs:468:38 [INFO] [stdout] | [INFO] [stdout] 468 | let is_display = self.tree[cur_ix].next.map_or(false, |next_ix| { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 469 | | matches!( [INFO] [stdout] 470 | | self.tree[next_ix].item.body, [INFO] [stdout] 471 | | ItemBody::MaybeMath(_can_open, _can_close, _brace_context) [INFO] [stdout] 472 | | ) [INFO] [stdout] 473 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 468 - let is_display = self.tree[cur_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 468 + let is_display = self.tree[cur_ix].next.is_some_and(|next_ix| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parse.rs:494:37 [INFO] [stdout] | [INFO] [stdout] 494 | / ... self.tree[scan_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 495 | | ... matches!( [INFO] [stdout] 496 | | ... self.tree[next_ix].item.body, [INFO] [stdout] 497 | | ... ItemBody::MaybeMath( [INFO] [stdout] ... | [INFO] [stdout] 503 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 494 - self.tree[scan_ix].next.map_or(false, |next_ix| { [INFO] [stdout] 494 + self.tree[scan_ix].next.is_some_and(|next_ix| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/parse.rs:2714:34 [INFO] [stdout] | [INFO] [stdout] 2714 | Event::Start(tag) => match tag { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 2715 | | Tag::Link { [INFO] [stdout] 2716 | | link_type, [INFO] [stdout] 2717 | | dest_url, [INFO] [stdout] ... | [INFO] [stdout] 2721 | | _ => None, [INFO] [stdout] 2722 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/parse.rs:2714:26 [INFO] [stdout] | [INFO] [stdout] 2714 | Event::Start(tag) => match tag { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 2715 | / Tag::Link { [INFO] [stdout] 2716 | | link_type, [INFO] [stdout] 2717 | | dest_url, [INFO] [stdout] 2718 | | title, [INFO] [stdout] 2719 | | id, [INFO] [stdout] 2720 | | } => Some((link_type, dest_url, title, 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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/parse.rs:2739:13 [INFO] [stdout] | [INFO] [stdout] 2739 | / match ev { [INFO] [stdout] 2740 | | Event::Start(Tag::CodeBlock(CodeBlockKind::Fenced(syntax))) => { [INFO] [stdout] 2741 | | assert_eq!(syntax.as_ref(), "test"); [INFO] [stdout] 2742 | | found += 1; [INFO] [stdout] 2743 | | } [INFO] [stdout] 2744 | | _ => {} [INFO] [stdout] 2745 | | } [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] 2739 ~ if let Event::Start(Tag::CodeBlock(CodeBlockKind::Fenced(syntax))) = ev { [INFO] [stdout] 2740 + assert_eq!(syntax.as_ref(), "test"); [INFO] [stdout] 2741 + found += 1; [INFO] [stdout] 2742 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/parse.rs:2755:13 [INFO] [stdout] | [INFO] [stdout] 2755 | / match ev { [INFO] [stdout] 2756 | | Event::Start(Tag::CodeBlock(CodeBlockKind::Indented)) => { [INFO] [stdout] 2757 | | found += 1; [INFO] [stdout] ... | [INFO] [stdout] 2760 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 2755 ~ if let Event::Start(Tag::CodeBlock(CodeBlockKind::Indented)) = ev { [INFO] [stdout] 2756 + found += 1; [INFO] [stdout] 2757 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parse.rs:2789:41 [INFO] [stdout] | [INFO] [stdout] 2789 | fn common_lifetime_patterns_allowed<'b>() { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/scanners.rs:494:5 [INFO] [stdout] | [INFO] [stdout] 494 | / match bytes { [INFO] [stdout] 495 | | &[] => Some(0), [INFO] [stdout] 496 | | &[b'\n', ..] => Some(1), [INFO] [stdout] 497 | | &[b'\r', b'\n', ..] => Some(2), [INFO] [stdout] 498 | | &[b'\r', ..] => Some(1), [INFO] [stdout] 499 | | _ => None, [INFO] [stdout] 500 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 494 ~ match *bytes { [INFO] [stdout] 495 ~ [] => Some(0), [INFO] [stdout] 496 ~ [b'\n', ..] => Some(1), [INFO] [stdout] 497 ~ [b'\r', b'\n', ..] => Some(2), [INFO] [stdout] 498 ~ [b'\r', ..] => Some(1), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/scanners.rs:734:16 [INFO] [stdout] | [INFO] [stdout] 734 | if suffix[..(next_line - i)].iter().any(|&b| b == b'`') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `suffix[..(next_line - i)].contains(&b'`')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1028:22 [INFO] [stdout] | [INFO] [stdout] 1028 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1059:22 [INFO] [stdout] | [INFO] [stdout] 1059 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1096:22 [INFO] [stdout] | [INFO] [stdout] 1096 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1119:22 [INFO] [stdout] | [INFO] [stdout] 1119 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scanners.rs:1267:22 [INFO] [stdout] | [INFO] [stdout] 1267 | newline_handler: Option<&dyn Fn(&[u8]) -> usize>, [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] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> src/strings.rs:317:9 [INFO] [stdout] | [INFO] [stdout] 317 | assert!(MAX_INLINE_STR_LEN >= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this to an anonymous constant: `const _: () = { assert!(..); }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.46s [INFO] running `Command { std: "docker" "inspect" "59e723f9f0d6606434ff983371bc114468449963d3736ec39cf0fb0766ccf5ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "59e723f9f0d6606434ff983371bc114468449963d3736ec39cf0fb0766ccf5ff", kill_on_drop: false }` [INFO] [stdout] 59e723f9f0d6606434ff983371bc114468449963d3736ec39cf0fb0766ccf5ff