Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
// tidy-alphabetical-start
#![feature(array_ptr_get)]
#![feature(asm_experimental_arch)]
#![feature(bigint_helper_methods)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(cfg_select)]
Expand All @@ -107,6 +106,7 @@
#![feature(const_destruct)]
#![feature(const_eval_select)]
#![feature(const_select_unpredictable)]
#![feature(const_unsigned_bigint_helpers)]
#![feature(core_intrinsics)]
#![feature(coverage_attribute)]
#![feature(disjoint_bitor)]
Expand All @@ -120,6 +120,7 @@
#![feature(ptr_alignment_type)]
#![feature(ptr_metadata)]
#![feature(set_ptr_value)]
#![feature(signed_bigint_helpers)]
#![feature(slice_ptr_get)]
#![feature(str_internals)]
#![feature(str_split_inclusive_remainder)]
Expand All @@ -129,6 +130,7 @@
#![feature(unsafe_pinned)]
#![feature(utf16_extra)]
#![feature(variant_count)]
#![feature(widening_mul)]
// tidy-alphabetical-end
//
// Language features:
Expand Down
26 changes: 13 additions & 13 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2522,7 +2522,7 @@ macro_rules! int_impl {
/// # Examples
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(signed_bigint_helpers)]
/// // Only the most significant word is signed.
/// //
#[doc = concat!("// 10 MAX (a = 10 × 2^", stringify!($BITS), " + 2^", stringify!($BITS), " - 1)")]
Expand All @@ -2544,7 +2544,7 @@ macro_rules! int_impl {
///
/// assert_eq!((sum1, sum0), (6, 8));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -2625,7 +2625,7 @@ macro_rules! int_impl {
/// # Examples
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(signed_bigint_helpers)]
/// // Only the most significant word is signed.
/// //
#[doc = concat!("// 6 8 (a = 6 × 2^", stringify!($BITS), " + 8)")]
Expand All @@ -2647,7 +2647,7 @@ macro_rules! int_impl {
///
#[doc = concat!("assert_eq!((diff1, diff0), (10, ", stringify!($UnsignedT), "::MAX));")]
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -2717,12 +2717,12 @@ macro_rules! int_impl {
/// Please note that this example is shared among integer types, which is why `i32` is used.
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(widening_mul)]
/// assert_eq!(5i32.widening_mul(-2), (4294967286, -1));
/// assert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "widening_mul", issue = "152016")]
#[rustc_const_unstable(feature = "widening_mul", issue = "152016")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand All @@ -2747,7 +2747,7 @@ macro_rules! int_impl {
/// Please note that this example is shared among integer types, which is why `i32` is used.
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(signed_bigint_helpers)]
/// assert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));
/// assert_eq!(5i32.carrying_mul(-2, 10), (0, 0));
/// assert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));
Expand All @@ -2757,8 +2757,8 @@ macro_rules! int_impl {
"(", stringify!($SelfT), "::MAX.unsigned_abs() + 1, ", stringify!($SelfT), "::MAX / 2));"
)]
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[rustc_const_unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand All @@ -2784,7 +2784,7 @@ macro_rules! int_impl {
/// Please note that this example is shared among integer types, which is why `i32` is used.
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(signed_bigint_helpers)]
/// assert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));
/// assert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));
/// assert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));
Expand All @@ -2794,8 +2794,8 @@ macro_rules! int_impl {
"(", stringify!($UnsignedT), "::MAX, ", stringify!($SelfT), "::MAX / 2));"
)]
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[rustc_const_unstable(feature = "signed_bigint_helpers", issue = "151989")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
24 changes: 12 additions & 12 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@ macro_rules! uint_impl {
/// assert_eq!((sum1, sum0), (9, 6));
/// ```
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -2899,7 +2899,7 @@ macro_rules! uint_impl {
#[doc = concat!("assert_eq!((diff1, diff0), (3, ", stringify!($SelfT), "::MAX));")]
/// ```
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -3011,14 +3011,14 @@ macro_rules! uint_impl {
/// # Examples
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(widening_mul)]
#[doc = concat!("assert_eq!(5_", stringify!($SelfT), ".widening_mul(7), (35, 0));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.widening_mul(", stringify!($SelfT), "::MAX), (1, ", stringify!($SelfT), "::MAX - 1));")]
/// ```
///
/// Compared to other `*_mul` methods:
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(widening_mul)]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::widening_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), (0, 3));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::overflowing_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), (0, true));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::wrapping_mul(1 << ", stringify!($BITS_MINUS_ONE), ", 6), 0);")]
Expand All @@ -3028,12 +3028,12 @@ macro_rules! uint_impl {
/// Please note that this example is shared among integer types, which is why `u32` is used.
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(widening_mul)]
/// assert_eq!(5u32.widening_mul(2), (10, 0));
/// assert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[unstable(feature = "widening_mul", issue = "152016")]
#[rustc_const_unstable(feature = "widening_mul", issue = "152016")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -3072,7 +3072,7 @@ macro_rules! uint_impl {
/// implementing it for wider-than-native types.
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(const_unsigned_bigint_helpers)]
/// fn scalar_mul_eq(little_endian_digits: &mut Vec<u16>, multiplicand: u16) {
/// let mut carry = 0;
/// for d in little_endian_digits.iter_mut() {
Expand All @@ -3097,7 +3097,7 @@ macro_rules! uint_impl {
/// except that it gives the value of the overflow instead of just whether one happened:
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(const_unsigned_bigint_helpers)]
/// let r = u8::carrying_mul(7, 13, 0);
/// assert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));
/// let r = u8::carrying_mul(13, 42, 0);
Expand All @@ -3109,14 +3109,14 @@ macro_rules! uint_impl {
/// [`wrapping_add`](Self::wrapping_add) methods:
///
/// ```
/// #![feature(bigint_helper_methods)]
/// #![feature(const_unsigned_bigint_helpers)]
/// assert_eq!(
/// 789_u16.carrying_mul(456, 123).0,
/// 789_u16.wrapping_mul(456).wrapping_add(123),
/// );
/// ```
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -3182,7 +3182,7 @@ macro_rules! uint_impl {
/// );
/// ```
#[stable(feature = "unsigned_bigint_helpers", since = "1.91.0")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_unsigned_bigint_helpers", issue = "152015")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
4 changes: 3 additions & 1 deletion library/coretests/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#![feature(ascii_char_variants)]
#![feature(async_iter_from_iter)]
#![feature(async_iterator)]
#![feature(bigint_helper_methods)]
#![feature(bool_to_result)]
#![feature(bstr)]
#![feature(cfg_target_has_reliable_f16_f128)]
Expand All @@ -34,6 +33,7 @@
#![feature(const_result_trait_fn)]
#![feature(const_select_unpredictable)]
#![feature(const_trait_impl)]
#![feature(const_unsigned_bigint_helpers)]
#![feature(control_flow_ok)]
#![feature(core_float_math)]
#![feature(core_intrinsics)]
Expand Down Expand Up @@ -98,6 +98,7 @@
#![feature(portable_simd)]
#![feature(ptr_metadata)]
#![feature(result_option_map_or_default)]
#![feature(signed_bigint_helpers)]
#![feature(slice_from_ptr_range)]
#![feature(slice_index_methods)]
#![feature(slice_internals)]
Expand All @@ -122,6 +123,7 @@
#![feature(uint_gather_scatter_bits)]
#![feature(unsize)]
#![feature(unwrap_infallible)]
#![feature(widening_mul)]
// tidy-alphabetical-end
#![allow(internal_features)]
#![deny(fuzzy_provenance_casts)]
Expand Down
1 change: 0 additions & 1 deletion library/stdarch/crates/core_arch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
f16,
aarch64_unstable_target_feature,
target_feature_inline_always,
bigint_helper_methods,
funnel_shifts,
avx10_target_feature,
const_trait_impl,
Expand Down
1 change: 0 additions & 1 deletion tests/assembly-llvm/x86_64-bigint-helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//@ compile-flags: -C llvm-args=-x86-asm-syntax=intel

#![no_std]
#![feature(bigint_helper_methods)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, this and the codegen-llvm test both could have removed the feature during the initial stabilisation, but for some reason, this wasn't noticed by our existing lints?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assembly and codegen tests don't deny warnings, IIRC, and don't show the compilation output from rustc, so it makes sense that they're not noticed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and so long as the feature exists I think it's normal that it doesn't lint that you didn't need the feature? At least for language features I don't think there's enough tracking to even tell, though I suppose for library features maybe there could be...


// This checks that the `carrying_add` and `borrowing_sub` implementation successfully chain,
// to catch issues like <https://github.com/rust-lang/rust/issues/85532#issuecomment-2495119815>
Expand Down
1 change: 0 additions & 1 deletion tests/codegen-llvm/bigint-helpers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ compile-flags: -C opt-level=3

#![crate_type = "lib"]
#![feature(bigint_helper_methods)]

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