]> git.lizzy.rs Git - rust.git/commit
core/std: squash dead_code warnings from fail! invocations.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sat, 2 Aug 2014 12:41:40 +0000 (22:41 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Mon, 11 Aug 2014 08:26:31 +0000 (18:26 +1000)
commit07aadc2e8b1923b28595393922a816e46d3903f4
tree33dd57a9cf350d949971b1957c7a6eace5166f33
parentf3d88c320d4b08e5534f2193462e6a20e27b1d85
core/std: squash dead_code warnings from fail! invocations.

The fail macro defines some function/static items internally, which got
a dead_code warning when `fail!()` is used inside a dead function. This
is ugly and unnecessarily reveals implementation details, so the
warnings can be squashed.

Fixes #16192.
src/libcore/macros.rs
src/librustc/middle/dead.rs
src/libstd/macros.rs
src/test/compile-fail/fail-no-dead-code-core.rs [new file with mode: 0644]
src/test/compile-fail/fail-no-dead-code.rs [new file with mode: 0644]
src/test/run-pass/dead-code-leading-underscore.rs