mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-08 18:31:35 +00:00
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.