Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9471ab0

Browse files
authored
Rollup merge of rust-lang#75059 - shengsheng:typos, r=Dylan-DPC
fix typos Fix common misspellings with https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2 parents db3e10f + 3b4151c commit 9471ab0

File tree

22 files changed

+25
-25
lines changed

22 files changed

+25
-25
lines changed

library/alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ impl<T: ?Sized> Unpin for Rc<T> {}
21012101
///
21022102
/// - This function is safe for any argument if `T` is sized, and
21032103
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2104-
/// aquired from the real instance that you are getting this offset for.
2104+
/// acquired from the real instance that you are getting this offset for.
21052105
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
21062106
// Align the unsized value to the end of the `RcBox`.
21072107
// Because it is ?Sized, it will always be the last field in memory.

library/alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ impl<T: ?Sized> Unpin for Arc<T> {}
22552255
///
22562256
/// - This function is safe for any argument if `T` is sized, and
22572257
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2258-
/// aquired from the real instance that you are getting this offset for.
2258+
/// acquired from the real instance that you are getting this offset for.
22592259
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
22602260
// Align the unsized value to the end of the `ArcInner`.
22612261
// Because it is `?Sized`, it will always be the last field in memory.

library/alloc/tests/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn box_clone_and_clone_from_equivalence() {
3737
/// This test might give a false positive in case the box realocates, but the alocator keeps the
3838
/// original pointer.
3939
///
40-
/// On the other hand it won't give a false negative, if it fails than the memory was definitly not
40+
/// On the other hand it won't give a false negative, if it fails than the memory was definitely not
4141
/// reused
4242
#[test]
4343
fn box_clone_from_ptr_stability() {

library/std/src/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ unsafe impl AllocRef for System {
189189
ReallocPlacement::MayMove if layout.size() == 0 => {
190190
let new_layout =
191191
// SAFETY: The new size and layout alignement guarantees
192-
// are transfered to the caller (they come from parameters).
192+
// are transferred to the caller (they come from parameters).
193193
//
194194
// See the preconditions for `Layout::from_size_align` to
195195
// see what must be checked.
@@ -254,7 +254,7 @@ unsafe impl AllocRef for System {
254254
//
255255
// See `GlobalAlloc::realloc` for more informations about the
256256
// guarantees expected by this method. `ptr`, `layout` and
257-
// `new_size` are parameters and the responsability for their
257+
// `new_size` are parameters and the responsibility for their
258258
// correctness is left to the caller.
259259
//
260260
// `realloc` probably checks for `new_size < size` or something

library/std/src/keyword_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ mod self_upper_keyword {}
13631363
///
13641364
/// let r1 = &FOO as *const _;
13651365
/// let r2 = &FOO as *const _;
1366-
/// // With a strictly read-only static, references will have the same adress
1366+
/// // With a strictly read-only static, references will have the same address
13671367
/// assert_eq!(r1, r2);
13681368
/// // A static item can be used just like a variable in many cases
13691369
/// println!("{:?}", FOO);

library/std/src/sync/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
// see the changes to drop the `Waiter` struct correctly.
8282
// * There is one place where the two atomics `Once.state_and_queue` and
8383
// `Waiter.signaled` come together, and might be reordered by the compiler or
84-
// processor. Because both use Aquire ordering such a reordering is not
84+
// processor. Because both use Acquire ordering such a reordering is not
8585
// allowed, so no need for SeqCst.
8686

8787
use crate::cell::Cell;

src/librustc_infer/infer/combine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
166166
return self.unify_const_variable(!a_is_expected, vid, a);
167167
}
168168
(ty::ConstKind::Unevaluated(..), _) if self.tcx.lazy_normalization() => {
169-
// FIXME(#59490): Need to remove the leak check to accomodate
169+
// FIXME(#59490): Need to remove the leak check to accommodate
170170
// escaping bound variables here.
171171
if !a.has_escaping_bound_vars() && !b.has_escaping_bound_vars() {
172172
relation.const_equate_obligation(a, b);
173173
}
174174
return Ok(b);
175175
}
176176
(_, ty::ConstKind::Unevaluated(..)) if self.tcx.lazy_normalization() => {
177-
// FIXME(#59490): Need to remove the leak check to accomodate
177+
// FIXME(#59490): Need to remove the leak check to accommodate
178178
// escaping bound variables here.
179179
if !a.has_escaping_bound_vars() && !b.has_escaping_bound_vars() {
180180
relation.const_equate_obligation(a, b);

src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
195195
}
196196
}
197197
if let (Some(ident), true) = (override_error_code, fn_returns.is_empty()) {
198-
// Provide a more targetted error code and description.
198+
// Provide a more targeted error code and description.
199199
err.code(rustc_errors::error_code!(E0772));
200200
err.set_primary_message(&format!(
201201
"{} has {} but calling `{}` introduces an implicit `'static` lifetime \

src/librustc_metadata/rmeta/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl<'a, 'tcx> SpecializedEncoder<Span> for EncodeContext<'a, 'tcx> {
267267
// real code should never need to care about this.
268268
//
269269
// 2. Using `Span::def_site` or `Span::mixed_site` will not
270-
// include any hygiene information associated with the defintion
270+
// include any hygiene information associated with the definition
271271
// site. This means that a proc-macro cannot emit a `$crate`
272272
// identifier which resolves to one of its dependencies,
273273
// which also should never come up in practice.

src/librustc_middle/ty/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ struct OpaqueTypeExpander<'tcx> {
585585
found_recursion: bool,
586586
/// Whether or not to check for recursive opaque types.
587587
/// This is `true` when we're explicitly checking for opaque type
588-
/// recursion, and 'false' otherwise to avoid unecessary work.
588+
/// recursion, and 'false' otherwise to avoid unnecessary work.
589589
check_recursion: bool,
590590
tcx: TyCtxt<'tcx>,
591591
}

0 commit comments

Comments
 (0)