Variables with rustc_layout_scalar_valid_range are not assumed to be in their range #82224
Labels
A-layout
Area: Memory layout of types
A-mir-opt
Area: MIR optimizations
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I have noticed that for example
NonZero
integers are not assumed to be non-zero.(it also affects division)
Manually adding
intrinsics::assume
fixes that issue, but this cannot be used inconst
functions.Related to #79114 and #79134
The text was updated successfully, but these errors were encountered: