External Publication
Visit Post

Pre-RFC: Deprecation and separation of the dead_code lint

Rust Internals [Unofficial] March 2, 2026
Source

TIL that this triggers unreachable_code, not dead_code. Interesting.

fn main() {
    std::process::exit(0);
    println!("dead code");
}

It seems worth adding an explanation to the RFC of what the dead_code lint does, since apparently it does not lint on dead code as in my example above.

Discussion in the ATmosphere

Loading comments...