]> git.lizzy.rs Git - rust.git/commit
Dogfood {exclusive,half-open} ranges in compiler (nfc)
authorJubilee Young <workingjubilee@gmail.com>
Thu, 22 Oct 2020 18:42:44 +0000 (11:42 -0700)
committerJubilee Young <workingjubilee@gmail.com>
Thu, 29 Oct 2020 03:09:20 +0000 (20:09 -0700)
commit0e88db7db4c09c63ba8a0036d34e72bd48719bd1
tree06918207d954eaca15caa69eae65dbb9947138a4
parenta9cd294cf2775441e713c7ee2918b728733b99f5
Dogfood {exclusive,half-open} ranges in compiler (nfc)

In particular, this allows us to write more explicit matches that
avoid the pitfalls of using a fully general fall-through case, yet
remain fairly ergonomic. Less logic is in guard cases, more is in
the actual exhaustive case analysis.

No functional changes.
compiler/rustc_lint/src/lib.rs
compiler/rustc_lint/src/unused.rs
compiler/rustc_middle/src/lib.rs
compiler/rustc_middle/src/ty/inhabitedness/mod.rs
compiler/rustc_middle/src/ty/sty.rs
compiler/rustc_session/src/filesearch.rs