summary refs log tree commit diff
path: root/library/core/src/num/nonzero.rs
AgeCommit message (Expand)AuthorLines
2024-03-09NonZero::from_mut_unchecked is library UBBen Kimock-1/+1
2024-03-08Distinguish between library and lang UB in assert_unsafe_preconditionBen Kimock-4/+6
2024-03-01Make `ZeroablePrimitive` trait unsafe.Markus Reiter-2/+6
2024-02-22Use generic `NonZero` everywhere in `core`.Markus Reiter-9/+7
2024-02-17Implement `NonZero` traits generically.Markus Reiter-179/+211
2024-02-17Auto merge of #120563 - reitermarkus:generic-nonzero-get, r=dtolnaybors-20/+21
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-1/+1
2024-02-15Use generic `NonZero` internally.Markus Reiter-5/+5
2024-02-09Auto merge of #120676 - Mark-Simulacrum:bootstrap-bump, r=clubby789bors-6/+0
2024-02-08Make `NonZero::get` generic.Markus Reiter-20/+21
2024-02-08Use `transmute_unchecked` in `NonZero::new`.Markus Reiter-3/+1
2024-02-08Step all bootstrap cfgs forwardMark Rousskov-6/+0
2024-02-07Replace `transmute_copy` with `ptr::read`.Markus Reiter-1/+2
2024-02-07Don't use `assert_unsafe_precondition` twice.Markus Reiter-12/+10
2024-02-07Make `NonZero` constructors generic.Markus Reiter-71/+84
2024-02-07Simplify `impl_zeroable_primitive` macro.Markus Reiter-13/+13
2024-01-27Switch `NonZero` alias direction.Markus Reiter-18/+32
2024-01-24Rollup merge of #118326 - WaffleLapkin:nz_count_ones, r=scottmcmLeón Orell Valerian Liehr-0/+37
2024-01-24Add `NonZero*::count_ones`Maybe Waffle-0/+37
2024-01-23Auto merge of #120283 - fmease:rollup-rk0f6r5, r=fmeasebors-8/+101
2024-01-22Use `Self` in `NonZero*` implementations.Markus Reiter-43/+48
2024-01-21Manually implement derived `NonZero` traits.Markus Reiter-8/+101
2024-01-19Assign tracking issue number for feature(nonzero_from_mut)SOFe-2/+2
2024-01-19Added assert_unsafe_precondition! check for NonZeroXxx::from_mut_uncheckedSOFe-13/+20
2024-01-19Added NonZeroXxx::from_mut(_unchecked)?SOFe-0/+26
2024-01-19Rollup merge of #118665 - dtolnay:signedness, r=NilstriebMatthias Krüger-1265/+1211
2024-01-15Add private `NonZero<T>` type alias.Markus Reiter-0/+63
2024-01-14Unbreak tidy's feature parserDavid Tolnay-52/+31
2024-01-14Move BITS into omnibus impl blockDavid Tolnay-37/+14
2024-01-14Move signed MIN and MAX into signedness_dependent_methodsDavid Tolnay-52/+35
2024-01-14Move unsigned MIN and MAX into signedness_dependent_methodsDavid Tolnay-43/+26
2024-01-14Move is_power_of_two into unsigned part of signedness_dependent_methodsDavid Tolnay-40/+28
2024-01-14Move nonzero_unsigned_signed_operations methods into the omnibus impl blockDavid Tolnay-225/+201
2024-01-14Work around rustfmt doc attribute indentation bugDavid Tolnay-0/+1
2024-01-14Unindent nonzero_integer_signedness_dependent_methods macro bodyDavid Tolnay-589/+589
2024-01-14Move signedness dependent methods into the omnibus impl blockDavid Tolnay-35/+30
2024-01-14Move Neg impl into the macro that generates Div and RemDavid Tolnay-20/+20
2024-01-14Move leading_zeros and trailing_zeros methods into nonzero_integer macroDavid Tolnay-71/+75
2024-01-14Unindent nonzero_integer_impl_div_rem macro bodyDavid Tolnay-21/+21
2024-01-14Move impl Div and Rem into nonzero_integer macroDavid Tolnay-14/+9
2024-01-14Move 'impl FromStr for NonZero' into nonzero_integer macroDavid Tolnay-9/+2
2024-01-14Format nonzero_integer macro calls same way we do the primitive int implsDavid Tolnay-20/+59
2024-01-14Unindent nonzero_integer macro bodyDavid Tolnay-139/+139
2024-01-14Define only a single NonZero type per macro callDavid Tolnay-6/+39
2024-01-14Move nonzero_integers macro call to bottom of moduleDavid Tolnay-15/+15
2024-01-06Add assume into `NonZeroIntX::get`AngelicosPhosphoros-4/+18
2023-11-28Fix comments for unsigned non-zero `checked_add`, `saturating_add`Zalathar-2/+2
2023-11-26Improve some comments for non-zero opsMaybe Waffle-14/+44
2023-11-25Convert many `assert_unsafe_precondition` to `debug_assert_nounwind`Gary Guo-4/+4
2023-08-15Add alignment to the NPO guaranteeScott McMurray-0/+14