1
Fork 0

implement contains_zero method

This commit is contained in:
Andreas Liljeqvist 2021-08-23 14:20:38 +02:00
parent d50abd0249
commit 70433955f4
3 changed files with 12 additions and 9 deletions

View file

@ -2857,10 +2857,8 @@ where
return;
}
if scalar.valid_range.start < scalar.valid_range.end {
if scalar.valid_range.start > 0 {
attrs.set(ArgAttribute::NonNull);
}
if !scalar.valid_range.contains_zero() {
attrs.set(ArgAttribute::NonNull);
}
if let Some(pointee) = layout.pointee_info_at(cx, offset) {