Use generic NonZero
internally.
This commit is contained in:
parent
ee9c7c940c
commit
746a58d435
144 changed files with 653 additions and 604 deletions
|
@ -20,7 +20,7 @@ use rustc_target::spec::{abi::Abi as SpecAbi, HasTargetSpec, PanicStrategy, Targ
|
|||
|
||||
use std::cmp;
|
||||
use std::fmt;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::num::NonZero;
|
||||
use std::ops::Bound;
|
||||
|
||||
pub trait IntegerExt {
|
||||
|
@ -761,7 +761,7 @@ where
|
|||
};
|
||||
tcx.mk_layout(LayoutS {
|
||||
variants: Variants::Single { index: variant_index },
|
||||
fields: match NonZeroUsize::new(fields) {
|
||||
fields: match NonZero::<usize>::new(fields) {
|
||||
Some(fields) => FieldsShape::Union(fields),
|
||||
None => FieldsShape::Arbitrary { offsets: IndexVec::new(), memory_index: IndexVec::new() },
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue