rustc: Warn about dead constants

A few catch-all blocks ended up not having this case for constants.

Closes #17925
rustc: Remove the dummy hack from check_match

Turns out you can create &'static T quite easily in a constant, I just forgot
about this!
auto merge of #17927 : alexcrichton/rust/more-const, r=nikomatsakis

* Apply the dead code lint to constants
* Flag all hidden/injected statics as `unnamed_addr`
* Remove a hack in rustc added when consts were added, turns out it's not necessary!