rust/compiler/rustc_borrowck/src
Matthias Krüger 6fb00b1514
Rollup merge of #143477 - folkertdev:use-is-multiple-of, r=joshtriplett
use `is_multiple_of` and `div_ceil`

In tricky logic, these functions are much more informative than the manual implementations. They also catch subtle bugs:

- the manual `is_multiple_of` often does not handle division by zero
- manual `div_ceil` often does not consider overflow

The transformation is free for `is_multiple_of` if the divisor is compile-time known to be non-zero. For `div_ceil` there is a small cost to considering overflow. Here is some assembly https://godbolt.org/z/5zP8KaE1d.
2025-07-06 10:03:23 +02:00
..
constraints Move placeholder handling to a proper preprocessing step 2025-06-03 12:20:15 +02:00
diagnostics Nits 2025-07-04 18:26:09 +00:00
polonius Rollup merge of #143477 - folkertdev:use-is-multiple-of, r=joshtriplett 2025-07-06 10:03:23 +02:00
region_infer Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00
type_check Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00
borrow_set.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
borrowck_errors.rs Use closure parse code 2025-03-06 17:58:32 -03:00
consumers.rs borrowck typeck children together with their parent 2025-04-08 00:34:40 +02:00
dataflow.rs use MixedBitSet for borrows-in-scope computation 2025-06-13 18:01:32 +00:00
def_use.rs Visit place in BackwardIncompatibleDropHint statement 2025-04-13 22:01:54 +00:00
handle_placeholders.rs Use an enum for SCC representatives, plus other code review 2025-06-04 13:26:08 +02:00
lib.rs Init local_names lazily for borrowck diagnostics 2025-06-22 17:16:36 +01:00
member_constraints.rs Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
nll.rs Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00
path_utils.rs remove borrowck duplicate of std::ops::ControlFlow 2025-01-01 12:13:33 +00:00
place_ext.rs Remove #[macro_use] extern crate tracing from rustc_borrowck. 2024-08-30 17:14:53 +10:00
places_conflict.rs Implement MIR, CTFE, and codegen for unsafe binders 2025-01-31 17:19:53 +00:00
prefixes.rs Implement MIR, CTFE, and codegen for unsafe binders 2025-01-31 17:19:53 +00:00
renumber.rs Squash fold into ty 2025-03-15 06:34:36 +00:00
root_cx.rs borrowck nested items in dead code 2025-05-02 18:45:28 +00:00
session_diagnostics.rs move check_opaque_type_parameter_valid 2025-04-03 11:13:10 +02:00
universal_regions.rs Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00
used_muts.rs Remove unnecessary lifetimes in dataflow structs. 2024-09-09 16:14:18 +10:00