Idea: Mark code as "known dead" to silence dead-code lint

The expect() idea sounds nice.

But for the specific problem of compiler being annoying about unfinished code, I use this:

#![cfg_attr(debug_assertions, allow(dead_code, bad_style, unused)]

The debug assertions hack is supposed to enable this only while I’m working on it, but still warn me about issues before I release it. I wish there was some smarter logic for unfinished code/not-yet-useful lints.

2 Likes