Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 29cdc6a

Browse files
committed
Auto merge of #145003 - Kobzol:rollup-kgb216b, r=Kobzol
Rollup of 12 pull requests Successful merges: - #144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - #144676 (Add documentation for unstable_feature_bound) - #144836 (Change visibility of Args new function) - #144910 (Add regression tests for seemingly fixed issues) - #144913 ([rustdoc] Fix wrong `i` tooltip icon) - #144924 (compiletest: add hint for when a ui test produces no errors) - #144926 (Correct the use of `must_use` on btree::IterMut) - #144928 (Drop `rust-version` from `rustc_thread_pool`) - #144945 (Autolabel PRs that change explicit tail call tests as `F-explicit_tail_calls`) - #144954 (run-make: Allow blessing snapshot files that don't exist yet) - #144971 (num: Rename `isolate_most_least_significant_one` functions) - #144978 (Fix some doc links for intrinsics) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 8fb40f7 + 66f0f27 commit 29cdc6a

File tree

80 files changed

+260
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+260
-107
lines changed

‎compiler/rustc_thread_pool/Cargo.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ authors = [
77
]
88
description = "Core APIs for Rayon - fork for rustc"
99
license = "MIT OR Apache-2.0"
10-
rust-version = "1.63"
1110
edition = "2021"
1211
readme = "README.md"
1312
keywords = ["parallel", "thread", "concurrency", "join", "performance"]

‎library/alloc/src/collections/btree/map.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ impl<'a, K: 'a, V: 'a> Default for Iter<'a, K, V> {
382382
/// documentation for more.
383383
///
384384
/// [`iter_mut`]: BTreeMap::iter_mut
385+
#[must_use = "iterators are lazy and do nothing unless consumed"]
385386
#[stable(feature = "rust1", since = "1.0.0")]
386387
pub struct IterMut<'a, K: 'a, V: 'a> {
387388
range: LazyLeafRange<marker::ValMut<'a>, K, V>,
@@ -391,7 +392,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
391392
_marker: PhantomData<&'a mut (K, V)>,
392393
}
393394

394-
#[must_use = "iterators are lazy and do nothing unless consumed"]
395395
#[stable(feature = "collection_debug", since = "1.17.0")]
396396
impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> {
397397
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

‎library/core/src/intrinsics/mod.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ pub unsafe fn vtable_align(ptr: *const ()) -> usize;
26672667
/// More specifically, this is the offset in bytes between successive
26682668
/// items of the same type, including alignment padding.
26692669
///
2670-
/// The stabilized version of this intrinsic is [`size_of`].
2670+
/// The stabilized version of this intrinsic is [`core::mem::size_of`].
26712671
#[rustc_nounwind]
26722672
#[unstable(feature = "core_intrinsics", issue = "none")]
26732673
#[rustc_intrinsic_const_stable_indirect]
@@ -2681,7 +2681,7 @@ pub const fn size_of<T>() -> usize;
26812681
/// Therefore, implementations must not require the user to uphold
26822682
/// any safety invariants.
26832683
///
2684-
/// The stabilized version of this intrinsic is [`align_of`].
2684+
/// The stabilized version of this intrinsic is [`core::mem::align_of`].
26852685
#[rustc_nounwind]
26862686
#[unstable(feature = "core_intrinsics", issue = "none")]
26872687
#[rustc_intrinsic_const_stable_indirect]
@@ -2704,7 +2704,7 @@ pub const fn variant_count<T>() -> usize;
27042704

27052705
/// The size of the referenced value in bytes.
27062706
///
2707-
/// The stabilized version of this intrinsic is [`size_of_val`].
2707+
/// The stabilized version of this intrinsic is [`core::mem::size_of_val`].
27082708
///
27092709
/// # Safety
27102710
///
@@ -2717,7 +2717,7 @@ pub const unsafe fn size_of_val<T: ?Sized>(ptr: *const T) -> usize;
27172717

27182718
/// The required alignment of the referenced value.
27192719
///
2720-
/// The stabilized version of this intrinsic is [`align_of_val`].
2720+
/// The stabilized version of this intrinsic is [`core::mem::align_of_val`].
27212721
///
27222722
/// # Safety
27232723
///

‎library/core/src/num/int_macros.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ macro_rules! int_impl {
177177
///
178178
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
179179
///
180-
/// assert_eq!(n.isolate_most_significant_one(), 0b_01000000);
181-
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_most_significant_one(), 0);")]
180+
/// assert_eq!(n.isolate_highest_one(), 0b_01000000);
181+
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")]
182182
/// ```
183183
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
184184
#[must_use = "this returns the result of the operation, \
185185
without modifying the original"]
186186
#[inline(always)]
187-
pub const fn isolate_most_significant_one(self) -> Self {
187+
pub const fn isolate_highest_one(self) -> Self {
188188
self & (((1 as $SelfT) << (<$SelfT>::BITS - 1)).wrapping_shr(self.leading_zeros()))
189189
}
190190

@@ -198,14 +198,14 @@ macro_rules! int_impl {
198198
///
199199
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
200200
///
201-
/// assert_eq!(n.isolate_least_significant_one(), 0b_00000100);
202-
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_least_significant_one(), 0);")]
201+
/// assert_eq!(n.isolate_lowest_one(), 0b_00000100);
202+
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")]
203203
/// ```
204204
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
205205
#[must_use = "this returns the result of the operation, \
206206
without modifying the original"]
207207
#[inline(always)]
208-
pub const fn isolate_least_significant_one(self) -> Self {
208+
pub const fn isolate_lowest_one(self) -> Self {
209209
self & self.wrapping_neg()
210210
}
211211

‎library/core/src/num/nonzero.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,15 +629,15 @@ macro_rules! nonzero_integer {
629629
#[doc = concat!("let a = NonZero::<", stringify!($Int), ">::new(0b_01100100)?;")]
630630
#[doc = concat!("let b = NonZero::<", stringify!($Int), ">::new(0b_01000000)?;")]
631631
///
632-
/// assert_eq!(a.isolate_most_significant_one(), b);
632+
/// assert_eq!(a.isolate_highest_one(), b);
633633
/// # Some(())
634634
/// # }
635635
/// ```
636636
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
637637
#[must_use = "this returns the result of the operation, \
638638
without modifying the original"]
639639
#[inline(always)]
640-
pub const fn isolate_most_significant_one(self) -> Self {
640+
pub const fn isolate_highest_one(self) -> Self {
641641
let n = self.get() & (((1 as $Int) << (<$Int>::BITS - 1)).wrapping_shr(self.leading_zeros()));
642642

643643
// SAFETY:
@@ -659,15 +659,15 @@ macro_rules! nonzero_integer {
659659
#[doc = concat!("let a = NonZero::<", stringify!($Int), ">::new(0b_01100100)?;")]
660660
#[doc = concat!("let b = NonZero::<", stringify!($Int), ">::new(0b_00000100)?;")]
661661
///
662-
/// assert_eq!(a.isolate_least_significant_one(), b);
662+
/// assert_eq!(a.isolate_lowest_one(), b);
663663
/// # Some(())
664664
/// # }
665665
/// ```
666666
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
667667
#[must_use = "this returns the result of the operation, \
668668
without modifying the original"]
669669
#[inline(always)]
670-
pub const fn isolate_least_significant_one(self) -> Self {
670+
pub const fn isolate_lowest_one(self) -> Self {
671671
let n = self.get();
672672
let n = n & n.wrapping_neg();
673673

‎library/core/src/num/uint_macros.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ macro_rules! uint_impl {
229229
///
230230
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
231231
///
232-
/// assert_eq!(n.isolate_most_significant_one(), 0b_01000000);
233-
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_most_significant_one(), 0);")]
232+
/// assert_eq!(n.isolate_highest_one(), 0b_01000000);
233+
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")]
234234
/// ```
235235
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
236236
#[must_use = "this returns the result of the operation, \
237237
without modifying the original"]
238238
#[inline(always)]
239-
pub const fn isolate_most_significant_one(self) -> Self {
239+
pub const fn isolate_highest_one(self) -> Self {
240240
self & (((1 as $SelfT) << (<$SelfT>::BITS - 1)).wrapping_shr(self.leading_zeros()))
241241
}
242242

@@ -250,14 +250,14 @@ macro_rules! uint_impl {
250250
///
251251
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
252252
///
253-
/// assert_eq!(n.isolate_least_significant_one(), 0b_00000100);
254-
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_least_significant_one(), 0);")]
253+
/// assert_eq!(n.isolate_lowest_one(), 0b_00000100);
254+
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")]
255255
/// ```
256256
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
257257
#[must_use = "this returns the result of the operation, \
258258
without modifying the original"]
259259
#[inline(always)]
260-
pub const fn isolate_least_significant_one(self) -> Self {
260+
pub const fn isolate_lowest_one(self) -> Self {
261261
self & self.wrapping_neg()
262262
}
263263

‎library/coretests/tests/nonzero.rs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn nonzero_trailing_zeros() {
321321
}
322322

323323
#[test]
324-
fn test_nonzero_isolate_most_significant_one() {
324+
fn test_nonzero_isolate_highest_one() {
325325
// Signed most significant one
326326
macro_rules! nonzero_int_impl {
327327
($($T:ty),+) => {
@@ -335,8 +335,8 @@ fn test_nonzero_isolate_most_significant_one() {
335335
let mut i = 0;
336336
while i < <$T>::BITS {
337337
assert_eq!(
338-
NonZero::<$T>::new(BITS >> i).unwrap().isolate_most_significant_one(),
339-
NonZero::<$T>::new(MOST_SIG_ONE >> i).unwrap().isolate_most_significant_one()
338+
NonZero::<$T>::new(BITS >> i).unwrap().isolate_highest_one(),
339+
NonZero::<$T>::new(MOST_SIG_ONE >> i).unwrap().isolate_highest_one()
340340
);
341341
i += 1;
342342
}
@@ -356,8 +356,8 @@ fn test_nonzero_isolate_most_significant_one() {
356356
let mut i = 0;
357357
while i < <$T>::BITS {
358358
assert_eq!(
359-
NonZero::<$T>::new(BITS >> i).unwrap().isolate_most_significant_one(),
360-
NonZero::<$T>::new(MOST_SIG_ONE >> i).unwrap().isolate_most_significant_one(),
359+
NonZero::<$T>::new(BITS >> i).unwrap().isolate_highest_one(),
360+
NonZero::<$T>::new(MOST_SIG_ONE >> i).unwrap().isolate_highest_one(),
361361
);
362362
i += 1;
363363
}
@@ -371,7 +371,7 @@ fn test_nonzero_isolate_most_significant_one() {
371371
}
372372

373373
#[test]
374-
fn test_nonzero_isolate_least_significant_one() {
374+
fn test_nonzero_isolate_lowest_one() {
375375
// Signed least significant one
376376
macro_rules! nonzero_int_impl {
377377
($($T:ty),+) => {
@@ -385,8 +385,8 @@ fn test_nonzero_isolate_least_significant_one() {
385385
let mut i = 0;
386386
while i < <$T>::BITS {
387387
assert_eq!(
388-
NonZero::<$T>::new(BITS << i).unwrap().isolate_least_significant_one(),
389-
NonZero::<$T>::new(LEAST_SIG_ONE << i).unwrap().isolate_least_significant_one()
388+
NonZero::<$T>::new(BITS << i).unwrap().isolate_lowest_one(),
389+
NonZero::<$T>::new(LEAST_SIG_ONE << i).unwrap().isolate_lowest_one()
390390
);
391391
i += 1;
392392
}
@@ -406,8 +406,8 @@ fn test_nonzero_isolate_least_significant_one() {
406406
let mut i = 0;
407407
while i < <$T>::BITS {
408408
assert_eq!(
409-
NonZero::<$T>::new(BITS << i).unwrap().isolate_least_significant_one(),
410-
NonZero::<$T>::new(LEAST_SIG_ONE << i).unwrap().isolate_least_significant_one(),
409+
NonZero::<$T>::new(BITS << i).unwrap().isolate_lowest_one(),
410+
NonZero::<$T>::new(LEAST_SIG_ONE << i).unwrap().isolate_lowest_one(),
411411
);
412412
i += 1;
413413
}

‎library/coretests/tests/num/int_macros.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ macro_rules! int_module {
194194
}
195195

196196
#[test]
197-
fn test_isolate_most_significant_one() {
197+
fn test_isolate_highest_one() {
198198
const BITS: $T = -1;
199199
const MOST_SIG_ONE: $T = 1 << (<$T>::BITS - 1);
200200

@@ -203,15 +203,15 @@ macro_rules! int_module {
203203
let mut i = 0;
204204
while i < <$T>::BITS {
205205
assert_eq!(
206-
(BITS >> i).isolate_most_significant_one(),
207-
(MOST_SIG_ONE >> i).isolate_most_significant_one()
206+
(BITS >> i).isolate_highest_one(),
207+
(MOST_SIG_ONE >> i).isolate_highest_one()
208208
);
209209
i += 1;
210210
}
211211
}
212212

213213
#[test]
214-
fn test_isolate_least_significant_one() {
214+
fn test_isolate_lowest_one() {
215215
const BITS: $T = -1;
216216
const LEAST_SIG_ONE: $T = 1;
217217

@@ -220,8 +220,8 @@ macro_rules! int_module {
220220
let mut i = 0;
221221
while i < <$T>::BITS {
222222
assert_eq!(
223-
(BITS << i).isolate_least_significant_one(),
224-
(LEAST_SIG_ONE << i).isolate_least_significant_one()
223+
(BITS << i).isolate_lowest_one(),
224+
(LEAST_SIG_ONE << i).isolate_lowest_one()
225225
);
226226
i += 1;
227227
}

‎library/coretests/tests/num/uint_macros.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ macro_rules! uint_module {
151151
}
152152

153153
#[test]
154-
fn test_isolate_most_significant_one() {
154+
fn test_isolate_highest_one() {
155155
const BITS: $T = <$T>::MAX;
156156
const MOST_SIG_ONE: $T = 1 << (<$T>::BITS - 1);
157157

@@ -160,15 +160,15 @@ macro_rules! uint_module {
160160
let mut i = 0;
161161
while i < <$T>::BITS {
162162
assert_eq!(
163-
(BITS >> i).isolate_most_significant_one(),
164-
(MOST_SIG_ONE >> i).isolate_most_significant_one(),
163+
(BITS >> i).isolate_highest_one(),
164+
(MOST_SIG_ONE >> i).isolate_highest_one(),
165165
);
166166
i += 1;
167167
}
168168
}
169169

170170
#[test]
171-
fn test_isolate_least_significant_one() {
171+
fn test_isolate_lowest_one() {
172172
const BITS: $T = <$T>::MAX;
173173
const LEAST_SIG_ONE: $T = 1;
174174

@@ -177,8 +177,8 @@ macro_rules! uint_module {
177177
let mut i = 0;
178178
while i < <$T>::BITS {
179179
assert_eq!(
180-
(BITS << i).isolate_least_significant_one(),
181-
(LEAST_SIG_ONE << i).isolate_least_significant_one(),
180+
(BITS << i).isolate_lowest_one(),
181+
(LEAST_SIG_ONE << i).isolate_lowest_one(),
182182
);
183183
i += 1;
184184
}

‎library/std/src/sys/args/common.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl !Sync for Args {}
1212

1313
impl Args {
1414
#[inline]
15-
pub(super) fn new(args: Vec<OsString>) -> Self {
15+
pub fn new(args: Vec<OsString>) -> Self {
1616
Args { iter: args.into_iter() }
1717
}
1818
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /