-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add regression test for saturating_sub
bounds check issue
#145064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add regression test for saturating_sub
bounds check issue
#145064
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
77e7ee3
to
9647d03
Compare
Add codegen test for issue where `valid_index.saturating_sub(X)` produced an extra bounds check. This was fixed by the LLVM upgrade.
9647d03
to
163594c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on experience, I think using test cases with suffixes such as *-issue-139759.rs
seems to be more common (whether to change it or not is up to you). In any case, everything else is fine.
@bors r+ |
Rollup of 7 pull requests Successful merges: - #144553 (Rehome 32 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - #145064 (Add regression test for `saturating_sub` bounds check issue) - #145121 (bootstrap: `x.py dist rustc-src` should keep LLVM's siphash) - #145150 (Replace unsafe `security_attributes` function with safe `inherit_handle` alternative) - #145152 (Use `eq_ignore_ascii_case` to avoid heap alloc in `detect_confuse_type`) - #145200 (mbe: Fix typo in attribute tracing) - #145222 (Fix typo with paren rustc_llvm/build.rs) r? `@ghost` `@rustbot` modify labels: rollup
Add codegen test for issue where
valid_index.saturating_sub(X)
produced an extra bounds check.This was fixed by the LLVM upgrade.
Closes #139759