Skip to content

Commit 5606cfd

Browse files
authored
Unrolled build for #152018
Rollup merge of #152018 - clarfonthey:bigint-tracking-issues, r=scottmcm Move bigint helper tracking issues Closes #85532. This splits the remainder of the `bigint_helper_methods` tracking issue into three issues: * `signed_bigint_helpers`: #151989 * `widening_mul`: #152016 * `const_unsigned_bigint_helpers`: #152015 Note that the existing stable methods were merged under the `unsigned_bigint_helpers` feature as part of #144494.
2 parents 5ac8ece + 28feae0 commit 5606cfd

7 files changed

Lines changed: 31 additions & 30 deletions

File tree

library/core/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
// tidy-alphabetical-start
9898
#![feature(array_ptr_get)]
9999
#![feature(asm_experimental_arch)]
100-
#![feature(bigint_helper_methods)]
101100
#![feature(bstr)]
102101
#![feature(bstr_internals)]
103102
#![feature(cfg_select)]
@@ -107,6 +106,7 @@
107106
#![feature(const_destruct)]
108107
#![feature(const_eval_select)]
109108
#![feature(const_select_unpredictable)]
109+
#![feature(const_unsigned_bigint_helpers)]
110110
#![feature(core_intrinsics)]
111111
#![feature(coverage_attribute)]
112112
#![feature(disjoint_bitor)]
@@ -120,6 +120,7 @@
120120
#![feature(ptr_alignment_type)]
121121
#![feature(ptr_metadata)]
122122
#![feature(set_ptr_value)]
123+
#![feature(signed_bigint_helpers)]
123124
#![feature(slice_ptr_get)]
124125
#![feature(str_internals)]
125126
#![feature(str_split_inclusive_remainder)]
@@ -129,6 +130,7 @@
129130
#![feature(unsafe_pinned)]
130131
#![feature(utf16_extra)]
131132
#![feature(variant_count)]
133+
#![feature(widening_mul)]
132134
// tidy-alphabetical-end
133135
//
134136
// Language features:

library/core/src/num/int_macros.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,7 @@ macro_rules! int_impl {
25222522
/// # Examples
25232523
///
25242524
/// ```
2525-
/// #![feature(bigint_helper_methods)]
2525+
/// #![feature(signed_bigint_helpers)]
25262526
/// // Only the most significant word is signed.
25272527
/// //
25282528
#[doc = concat!("// 10 MAX (a = 10 × 2^", stringify!($BITS), " + 2^", stringify!($BITS), " - 1)")]
@@ -2544,7 +2544,7 @@ macro_rules! int_impl {
25442544
///
25452545
/// assert_eq!((sum1, sum0), (6, 8));
25462546
/// ```
2547-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2547+
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
25482548
#[must_use = "this returns the result of the operation, \
25492549
without modifying the original"]
25502550
#[inline]
@@ -2625,7 +2625,7 @@ macro_rules! int_impl {
26252625
/// # Examples
26262626
///
26272627
/// ```
2628-
/// #![feature(bigint_helper_methods)]
2628+
/// #![feature(signed_bigint_helpers)]
26292629
/// // Only the most significant word is signed.
26302630
/// //
26312631
#[doc = concat!("// 6 8 (a = 6 × 2^", stringify!($BITS), " + 8)")]
@@ -2647,7 +2647,7 @@ macro_rules! int_impl {
26472647
///
26482648
#[doc = concat!("assert_eq!((diff1, diff0), (10, ", stringify!($UnsignedT), "::MAX));")]
26492649
/// ```
2650-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2650+
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
26512651
#[must_use = "this returns the result of the operation, \
26522652
without modifying the original"]
26532653
#[inline]
@@ -2717,12 +2717,12 @@ macro_rules! int_impl {
27172717
/// Please note that this example is shared among integer types, which is why `i32` is used.
27182718
///
27192719
/// ```
2720-
/// #![feature(bigint_helper_methods)]
2720+
/// #![feature(widening_mul)]
27212721
/// assert_eq!(5i32.widening_mul(-2), (4294967286, -1));
27222722
/// assert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));
27232723
/// ```
2724-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2725-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
2724+
#[unstable(feature = "widening_mul", issue = "152016")]
2725+
#[rustc_const_unstable(feature = "widening_mul", issue = "152016")]
27262726
#[must_use = "this returns the result of the operation, \
27272727
without modifying the original"]
27282728
#[inline]
@@ -2747,7 +2747,7 @@ macro_rules! int_impl {
27472747
/// Please note that this example is shared among integer types, which is why `i32` is used.
27482748
///
27492749
/// ```
2750-
/// #![feature(bigint_helper_methods)]
2750+
/// #![feature(signed_bigint_helpers)]
27512751
/// assert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));
27522752
/// assert_eq!(5i32.carrying_mul(-2, 10), (0, 0));
27532753
/// assert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));
@@ -2757,8 +2757,8 @@ macro_rules! int_impl {
27572757
"(", stringify!($SelfT), "::MAX.unsigned_abs() + 1, ", stringify!($SelfT), "::MAX / 2));"
27582758
)]
27592759
/// ```
2760-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2761-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
2760+
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
2761+
#[rustc_const_unstable(feature = "signed_bigint_helpers", issue = "151989")]
27622762
#[must_use = "this returns the result of the operation, \
27632763
without modifying the original"]
27642764
#[inline]
@@ -2784,7 +2784,7 @@ macro_rules! int_impl {
27842784
/// Please note that this example is shared among integer types, which is why `i32` is used.
27852785
///
27862786
/// ```
2787-
/// #![feature(bigint_helper_methods)]
2787+
/// #![feature(signed_bigint_helpers)]
27882788
/// assert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));
27892789
/// assert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));
27902790
/// assert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));
@@ -2794,8 +2794,8 @@ macro_rules! int_impl {
27942794
"(", stringify!($UnsignedT), "::MAX, ", stringify!($SelfT), "::MAX / 2));"
27952795
)]
27962796
/// ```
2797-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2798-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
2797+
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
2798+
#[rustc_const_unstable(feature = "signed_bigint_helpers", issue = "151989")]
27992799
#[must_use = "this returns the result of the operation, \
28002800
without modifying the original"]
28012801
#[inline]

library/core/src/num/uint_macros.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,7 +2807,7 @@ macro_rules! uint_impl {
28072807
/// assert_eq!((sum1, sum0), (9, 6));
28082808
/// ```
28092809
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
2810-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
2810+
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
28112811
#[must_use = "this returns the result of the operation, \
28122812
without modifying the original"]
28132813
#[inline]
@@ -2899,7 +2899,7 @@ macro_rules! uint_impl {
28992899
#[doc = concat!("assert_eq!((diff1, diff0), (3, ", stringify!($SelfT), "::MAX));")]
29002900
/// ```
29012901
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
2902-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
2902+
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
29032903
#[must_use = "this returns the result of the operation, \
29042904
without modifying the original"]
29052905
#[inline]
@@ -3011,14 +3011,14 @@ macro_rules! uint_impl {
30113011
/// # Examples
30123012
///
30133013
/// ```
3014-
/// #![feature(bigint_helper_methods)]
3014+
/// #![feature(widening_mul)]
30153015
#[doc = concat!("assert_eq!(5_", stringify!($SelfT), ".widening_mul(7), (35, 0));")]
30163016
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.widening_mul(", stringify!($SelfT), "::MAX), (1, ", stringify!($SelfT), "::MAX - 1));")]
30173017
/// ```
30183018
///
30193019
/// Compared to other `*_mul` methods:
30203020
/// ```
3021-
/// #![feature(bigint_helper_methods)]
3021+
/// #![feature(widening_mul)]
30223022
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::widening_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), (0, 3));")]
30233023
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::overflowing_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), (0, true));")]
30243024
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::wrapping_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), 0);")]
@@ -3028,12 +3028,12 @@ macro_rules! uint_impl {
30283028
/// Please note that this example is shared among integer types, which is why `u32` is used.
30293029
///
30303030
/// ```
3031-
/// #![feature(bigint_helper_methods)]
3031+
/// #![feature(widening_mul)]
30323032
/// assert_eq!(5u32.widening_mul(2), (10, 0));
30333033
/// assert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));
30343034
/// ```
3035-
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
3036-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
3035+
#[unstable(feature = "widening_mul", issue = "152016")]
3036+
#[rustc_const_unstable(feature = "widening_mul", issue = "152016")]
30373037
#[must_use = "this returns the result of the operation, \
30383038
without modifying the original"]
30393039
#[inline]
@@ -3072,7 +3072,7 @@ macro_rules! uint_impl {
30723072
/// implementing it for wider-than-native types.
30733073
///
30743074
/// ```
3075-
/// #![feature(bigint_helper_methods)]
3075+
/// #![feature(const_unsigned_bigint_helpers)]
30763076
/// fn scalar_mul_eq(little_endian_digits: &mut Vec<u16>, multiplicand: u16) {
30773077
/// let mut carry = 0;
30783078
/// for d in little_endian_digits.iter_mut() {
@@ -3097,7 +3097,7 @@ macro_rules! uint_impl {
30973097
/// except that it gives the value of the overflow instead of just whether one happened:
30983098
///
30993099
/// ```
3100-
/// #![feature(bigint_helper_methods)]
3100+
/// #![feature(const_unsigned_bigint_helpers)]
31013101
/// let r = u8::carrying_mul(7, 13, 0);
31023102
/// assert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));
31033103
/// let r = u8::carrying_mul(13, 42, 0);
@@ -3109,14 +3109,14 @@ macro_rules! uint_impl {
31093109
/// [`wrapping_add`](Self::wrapping_add) methods:
31103110
///
31113111
/// ```
3112-
/// #![feature(bigint_helper_methods)]
3112+
/// #![feature(const_unsigned_bigint_helpers)]
31133113
/// assert_eq!(
31143114
/// 789_u16.carrying_mul(456, 123).0,
31153115
/// 789_u16.wrapping_mul(456).wrapping_add(123),
31163116
/// );
31173117
/// ```
31183118
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
3119-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
3119+
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
31203120
#[must_use = "this returns the result of the operation, \
31213121
without modifying the original"]
31223122
#[inline]
@@ -3182,7 +3182,7 @@ macro_rules! uint_impl {
31823182
/// );
31833183
/// ```
31843184
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
3185-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
3185+
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
31863186
#[must_use = "this returns the result of the operation, \
31873187
without modifying the original"]
31883188
#[inline]

library/coretests/tests/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![feature(ascii_char_variants)]
99
#![feature(async_iter_from_iter)]
1010
#![feature(async_iterator)]
11-
#![feature(bigint_helper_methods)]
1211
#![feature(bool_to_result)]
1312
#![feature(bstr)]
1413
#![feature(cfg_target_has_reliable_f16_f128)]
@@ -34,6 +33,7 @@
3433
#![feature(const_result_trait_fn)]
3534
#![feature(const_select_unpredictable)]
3635
#![feature(const_trait_impl)]
36+
#![feature(const_unsigned_bigint_helpers)]
3737
#![feature(control_flow_ok)]
3838
#![feature(core_float_math)]
3939
#![feature(core_intrinsics)]
@@ -98,6 +98,7 @@
9898
#![feature(portable_simd)]
9999
#![feature(ptr_metadata)]
100100
#![feature(result_option_map_or_default)]
101+
#![feature(signed_bigint_helpers)]
101102
#![feature(slice_from_ptr_range)]
102103
#![feature(slice_index_methods)]
103104
#![feature(slice_internals)]
@@ -122,6 +123,7 @@
122123
#![feature(uint_gather_scatter_bits)]
123124
#![feature(unsize)]
124125
#![feature(unwrap_infallible)]
126+
#![feature(widening_mul)]
125127
// tidy-alphabetical-end
126128
#![allow(internal_features)]
127129
#![deny(fuzzy_provenance_casts)]

library/stdarch/crates/core_arch/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
f16,
3434
aarch64_unstable_target_feature,
3535
target_feature_inline_always,
36-
bigint_helper_methods,
3736
funnel_shifts,
3837
avx10_target_feature,
3938
const_trait_impl,

tests/assembly-llvm/x86_64-bigint-helpers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//@ compile-flags: -C llvm-args=-x86-asm-syntax=intel
55

66
#![no_std]
7-
#![feature(bigint_helper_methods)]
87

98
// This checks that the `carrying_add` and `borrowing_sub` implementation successfully chain,
109
// to catch issues like <https://github.com/rust-lang/rust/issues/85532#issuecomment-2495119815>

tests/codegen-llvm/bigint-helpers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ compile-flags: -C opt-level=3
22

33
#![crate_type = "lib"]
4-
#![feature(bigint_helper_methods)]
54

65
// Note that there's also an assembly test for this, which is what checks for
76
// the `ADC` (Add with Carry) instruction on x86 now that the IR we emit uses

0 commit comments

Comments
 (0)