Skip to content

Commit 1cc1d0d

Browse files
authored
Rollup merge of rust-lang#134006 - klensy:typos, r=nnethercote
setup typos check in CI This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying? Also includes commits with actual typo fixes. MCP: rust-lang/compiler-team#817 typos check currently turned for: * ./compiler * ./library * ./src/bootstrap * ./src/librustdoc After merging, PRs which enables checks for other crates (tools) can be implemented too. Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr. Check typos: `python x.py test tidy --extra-checks=spellcheck` Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo) Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
2 parents 762a6eb + 010558d commit 1cc1d0d

File tree

21 files changed

+33
-33
lines changed

21 files changed

+33
-33
lines changed

core/src/fmt/num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ impl fmt::Display for i128 {
589589
}
590590

591591
impl u128 {
592-
/// Format optimized for u128. Computation of 128 bits is limited by proccessing
592+
/// Format optimized for u128. Computation of 128 bits is limited by processing
593593
/// in batches of 16 decimals at a time.
594594
#[doc(hidden)]
595595
#[unstable(

core/src/intrinsics/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ pub const fn unlikely(b: bool) -> bool {
459459
/// Therefore, implementations must not require the user to uphold
460460
/// any safety invariants.
461461
///
462-
/// The public form of this instrinsic is [`core::hint::select_unpredictable`].
462+
/// The public form of this intrinsic is [`core::hint::select_unpredictable`].
463463
/// However unlike the public form, the intrinsic will not drop the value that
464464
/// is not selected.
465465
#[unstable(feature = "core_intrinsics", issue = "none")]
@@ -2295,7 +2295,7 @@ where
22952295
/// used inside the `if const`.
22962296
/// Note that the two arms of this `if` really each become their own function, which is why the
22972297
/// macro supports setting attributes for those functions. The runtime function is always
2298-
/// markes as `#[inline]`.
2298+
/// marked as `#[inline]`.
22992299
///
23002300
/// See [`const_eval_select()`] for the rules and requirements around that intrinsic.
23012301
pub(crate) macro const_eval_select {
@@ -2535,7 +2535,7 @@ pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize)
25352535
/// Returns whether we should perform contract-checking at runtime.
25362536
///
25372537
/// This is meant to be similar to the ub_checks intrinsic, in terms
2538-
/// of not prematurely commiting at compile-time to whether contract
2538+
/// of not prematurely committing at compile-time to whether contract
25392539
/// checking is turned on, so that we can specify contracts in libstd
25402540
/// and let an end user opt into turning them on.
25412541
#[rustc_const_unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]

core/src/intrinsics/simd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub unsafe fn simd_funnel_shl<T>(a: T, b: T, shift: T) -> T;
160160
#[rustc_nounwind]
161161
pub unsafe fn simd_funnel_shr<T>(a: T, b: T, shift: T) -> T;
162162

163-
/// "Ands" vectors elementwise.
163+
/// "And"s vectors elementwise.
164164
///
165165
/// `T` must be a vector of integers.
166166
#[rustc_intrinsic]
@@ -522,7 +522,7 @@ pub unsafe fn simd_reduce_max<T, U>(x: T) -> U;
522522
#[rustc_nounwind]
523523
pub unsafe fn simd_reduce_min<T, U>(x: T) -> U;
524524

525-
/// Logical "ands" all elements together.
525+
/// Logical "and"s all elements together.
526526
///
527527
/// `T` must be a vector of integers or floats.
528528
///

core/src/io/borrowed_buf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl<'a> BorrowedCursor<'a> {
281281
/// Panics if there are less than `n` bytes initialized.
282282
#[inline]
283283
pub fn advance(&mut self, n: usize) -> &mut Self {
284-
// The substraction cannot underflow by invariant of this type.
284+
// The subtraction cannot underflow by invariant of this type.
285285
assert!(n <= self.buf.init - self.buf.filled);
286286

287287
self.buf.filled += n;

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#![allow(internal_features)]
9090
#![deny(ffi_unwind_calls)]
9191
#![warn(unreachable_pub)]
92-
// Do not check link redundancy on bootstraping phase
92+
// Do not check link redundancy on bootstrapping phase
9393
#![allow(rustdoc::redundant_explicit_links)]
9494
#![warn(rustdoc::unescaped_backticks)]
9595
//

core/src/num/dec2flt/float.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub trait RawFloat:
109109

110110
/// Round-to-even only happens for negative values of q
111111
/// when q ≥ −4 in the 64-bit case and when q ≥ −17 in
112-
/// the 32-bitcase.
112+
/// the 32-bit case.
113113
///
114114
/// When q ≥ 0,we have that 5^q ≤ 2m+1. In the 64-bit case,we
115115
/// have 5^q ≤ 2m+1 ≤ 2^54 or q ≤ 23. In the 32-bit case,we have
@@ -119,7 +119,7 @@ pub trait RawFloat:
119119
/// so (2m+1)×5^−q < 2^64. We have that 2m+1 > 2^53 (64-bit case)
120120
/// or 2m+1 > 2^24 (32-bit case). Hence,we must have 2^53×5^−q < 2^64
121121
/// (64-bit) and 2^24×5^−q < 2^64 (32-bit). Hence we have 5^−q < 2^11
122-
/// or q ≥ −4 (64-bit case) and 5^−q < 2^40 or q ≥ −17 (32-bitcase).
122+
/// or q ≥ −4 (64-bit case) and 5^−q < 2^40 or q ≥ −17 (32-bit case).
123123
///
124124
/// Thus we have that we only need to round ties to even when
125125
/// we have that q ∈ [−4,23](in the 64-bit case) or q∈[−17,10]
@@ -143,7 +143,7 @@ pub trait RawFloat:
143143
/// smaller than `10^SMALLEST_POWER_OF_TEN`, which will round to zero.
144144
///
145145
/// The smallest power of ten is represented by `⌊log10(2^-n / (2^64 - 1))⌋`, where `n` is
146-
/// the smallest power of two. The `2^64 - 1)` denomenator comes from the number of values
146+
/// the smallest power of two. The `2^64 - 1)` denominator comes from the number of values
147147
/// that are representable by the intermediate storage format. I don't actually know _why_
148148
/// the storage format is relevant here.
149149
///

core/src/pin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@
792792
//!
793793
//! 1. *Structural [`Unpin`].* A struct can be [`Unpin`] only if all of its
794794
//! structurally-pinned fields are, too. This is [`Unpin`]'s behavior by default.
795-
//! However, as a libray author, it is your responsibility not to write something like
795+
//! However, as a library author, it is your responsibility not to write something like
796796
//! <code>impl\<T> [Unpin] for Struct\<T> {}</code> and then offer a method that provides
797797
//! structural pinning to an inner field of `T`, which may not be [`Unpin`]! (Adding *any*
798798
//! projection operation requires unsafe code, so the fact that [`Unpin`] is a safe trait does

core/src/ptr/const_ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl<T: PointeeSized> *const T {
2929
if const #[rustc_allow_const_fn_unstable(const_raw_ptr_comparison)] {
3030
match (ptr).guaranteed_eq(null_mut()) {
3131
Some(res) => res,
32-
// To remain maximally convervative, we stop execution when we don't
32+
// To remain maximally conservative, we stop execution when we don't
3333
// know whether the pointer is null or not.
3434
// We can *not* return `false` here, that would be unsound in `NonNull::new`!
3535
None => panic!("null-ness of this pointer cannot be determined in const context"),
@@ -49,7 +49,7 @@ impl<T: PointeeSized> *const T {
4949
self as _
5050
}
5151

52-
/// Try to cast to a pointer of another type by checking aligment.
52+
/// Try to cast to a pointer of another type by checking alignment.
5353
///
5454
/// If the pointer is properly aligned to the target type, it will be
5555
/// cast to the target type. Otherwise, `None` is returned.

core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<T: PointeeSized> *mut T {
3232
self as _
3333
}
3434

35-
/// Try to cast to a pointer of another type by checking aligment.
35+
/// Try to cast to a pointer of another type by checking alignment.
3636
///
3737
/// If the pointer is properly aligned to the target type, it will be
3838
/// cast to the target type. Otherwise, `None` is returned.

core/src/ptr/non_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl<T: PointeeSized> NonNull<T> {
497497
unsafe { NonNull { pointer: self.as_ptr() as *mut U } }
498498
}
499499

500-
/// Try to cast to a pointer of another type by checking aligment.
500+
/// Try to cast to a pointer of another type by checking alignment.
501501
///
502502
/// If the pointer is properly aligned to the target type, it will be
503503
/// cast to the target type. Otherwise, `None` is returned.

0 commit comments

Comments
 (0)