$ cargo clippy -V
clippy 0.0.212 (c8e3cfbd 2019-10-28)
Clippy seems to hang forever when "Building" metrics 0.2.3. To reproduce simply create a new project with cargo init add metrics = "0.2.3" to the dependencies in Cargo.toml and run cargo clippy.
This didn't occur before I updated my toolchain with rustup update, which I did today to update to 1.40. I used 1.39 before. Other commands such as cargo check, cargo build (with or without --release) work just fine.
Thanks for the report! I'm able to reproduce this on my end and will try to find a smaller repro case now.
Minimal repro:
/// <foo
struct A {}
Turning the first line into /// <foo> or /// foo doesn't cause the endless build (please don't try it on the playground).
My guess is that it's related to the doc_markdown lint.
Unfortunately I ran out of time for today and will only be able to get back to this tomorrow.
Quick update: This seems to be caused somehow by the cognitive complexity lint. When I disable it in clippy_lints/src/lib.rs, it stops hanging.
Is this still a problem? I can't reproduce with the minimal repro or the metrics dependency. I'm using clippy master.
Ok, I get it when I use stable (1.40).
This is a bug in pulldown_cmark parser. I can reproduce it in their repo on master with minimal example:
#[test]
fn test_unterminated_foo() {
use pulldown_cmark::Parser;
let parser = Parser::new("<foo");
for _ in parser {}
}
Most helpful comment
This is a bug in
pulldown_cmarkparser. I can reproduce it in their repo on master with minimal example: