I used to think DCE and constant propagation were pointless: eg clean code shouldn't have dead sections. But inlining creates opportunities!
miniblog.
Related Posts
I find test coverage a useful thing to track, but I can't find a good metric.
"Coverage decreased by 10%" sounds bad. If you're deleting pointless code that has tests, it's good!
Perhaps total untested lines of code is better?
Clippy has a ton of clever lints I haven't seen before.
E.g. it suggests that `let _v = println!("hello");` could be `println!("hello");` because a variable of type () is pointless.
Warning about recursion in main is an excellent idea too.
Smalltalk shows a lint error if you recurse unconditionally: you've basically written a pointless infinite loop.
I've not seen lints for this elsewhere, but it's a really nice touch.