External Publication
Visit Post

Pre-RFC: Deprecation and separation of the dead_code lint

Rust Internals [Unofficial] March 1, 2026
Source

I originally was gonna suggest that, but then it becomes significantly harder for new users, and old users and dead_code is used more rarely, to remember what lints are under it vs unused. Naming the lints as dead_<item> doesn't solve this because what's covered by dead_code is relatively arbitrary. The docs say items, but imports aren't and in most languages dead_code is unreachable_code or any unused code so its much less intuitive and DWIM for newcomers.

Discussion in the ATmosphere

Loading comments...