]> git.lizzy.rs Git - rust.git/commit
compare_const_vals: add a special case for certain ranges.
authorNicholas Nethercote <n.nethercote@gmail.com>
Thu, 9 Jun 2022 00:23:39 +0000 (10:23 +1000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Thu, 16 Jun 2022 01:25:34 +0000 (11:25 +1000)
commitbdbf9b297b2d3372dfe70763643942e008933207
tree4ee4f3878d9b1eecaf6e41a2e370fbbb5033fb68
parent73c52b724a07900808483a5f06b928d703097cf1
compare_const_vals: add a special case for certain ranges.

This commit removes the `a == b` early return, which isn't useful in
practice, and replaces it with one that helps matches with many ranges,
including char ranges.
compiler/rustc_mir_build/src/thir/pattern/mod.rs