1
Fork 0

Use generic NonZero.

This commit is contained in:
Markus Reiter 2024-04-21 21:45:18 +02:00
parent 7531eafa7e
commit bd8e565e16
No known key found for this signature in database
GPG key ID: 245293B51702655B
22 changed files with 83 additions and 82 deletions

View file

@ -6,7 +6,7 @@ use crate::ty::{Align, IndexedVal, Ty, VariantIdx};
use crate::Error;
use crate::Opaque;
use std::fmt::{self, Debug};
use std::num::NonZeroUsize;
use std::num::NonZero;
use std::ops::RangeInclusive;
/// A function ABI definition.
@ -133,7 +133,7 @@ pub enum FieldsShape {
Primitive,
/// All fields start at no offset. The `usize` is the field count.
Union(NonZeroUsize),
Union(NonZero<usize>),
/// Array/vector-like placement, with all fields of identical types.
Array { stride: Size, count: u64 },