about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2022-10-22 15:37:46 +0100
committerJosh Triplett <josh@joshtriplett.org>2022-10-23 00:33:06 +0100
commit36662dfc83cb297c21f410eea60deb3ef6d0e940 (patch)
tree0ec31527d1ded3b2e85bf610f4d51f81208c8049 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent26c96e341639102afacbbcad0dc18ad0ac71ab18 (diff)
downloadrust-36662dfc83cb297c21f410eea60deb3ef6d0e940.tar.gz
rust-36662dfc83cb297c21f410eea60deb3ef6d0e940.zip
Fix wrapped valid-range handling in ty_find_init_error
Rust's niche handling allows for wrapping valid ranges with end < start;
for instance, a valid range with start=43 and end=41 means a niche of
42. Most places in the compiler handle this correctly, but
ty_find_init_error assumed that `lo > 0` means the type cannot contain a
zero.

Fix it to handle wrapping ranges.

Add a test to cover this case.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions