Skip to content

Commit 1d265eb

Browse files
committed
Fix typos “a”→“an”
1 parent 042de50 commit 1d265eb

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

alloc/src/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ pub mod __alloc_error_handler {
387387
panic!("memory allocation of {} bytes failed", size)
388388
}
389389

390-
// if there is a `#[alloc_error_handler]`
390+
// if there is an `#[alloc_error_handler]`
391391
#[rustc_std_internal_symbol]
392392
pub unsafe extern "C" fn __rg_oom(size: usize, align: usize) -> ! {
393393
let layout = unsafe { Layout::from_size_align_unchecked(size, align) };

core/src/iter/adapters/zip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ where
563563
}
564564

565565
unsafe trait SpecTrustedRandomAccess: Iterator {
566-
/// If `Self: TrustedRandomAccess`, it must be safe to call a
566+
/// If `Self: TrustedRandomAccess`, it must be safe to call
567567
/// `Iterator::__iterator_get_unchecked(self, index)`.
568568
unsafe fn try_get_unchecked(&mut self, index: usize) -> Self::Item;
569569
}

core/src/iter/traits/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl<I: FusedIterator + ?Sized> FusedIterator for &mut I {}
2525
/// (lower bound is equal to upper bound), or the upper bound is [`None`].
2626
/// The upper bound must only be [`None`] if the actual iterator length is
2727
/// larger than [`usize::MAX`]. In that case, the lower bound must be
28-
/// [`usize::MAX`], resulting in a [`Iterator::size_hint()`] of
28+
/// [`usize::MAX`], resulting in an [`Iterator::size_hint()`] of
2929
/// `(usize::MAX, None)`.
3030
///
3131
/// The iterator must produce exactly the number of elements it reported

core/src/num/dec2flt/lemire.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::num::dec2flt::table::{
99
/// Compute a float using an extended-precision representation.
1010
///
1111
/// Fast conversion of a the significant digits and decimal exponent
12-
/// a float to a extended representation with a binary float. This
12+
/// a float to an extended representation with a binary float. This
1313
/// algorithm will accurately parse the vast majority of cases,
1414
/// and uses a 128-bit representation (with a fallback 192-bit
1515
/// representation).

proc_macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ pub mod token_stream {
262262
}
263263

264264
/// `quote!(..)` accepts arbitrary tokens and expands into a `TokenStream` describing the input.
265-
/// For example, `quote!(a + b)` will produce a expression, that, when evaluated, constructs
265+
/// For example, `quote!(a + b)` will produce an expression, that, when evaluated, constructs
266266
/// the `TokenStream` `[Ident("a"), Punct('+', Alone), Ident("b")]`.
267267
///
268268
/// Unquoting is done with `$`, and works by taking the single next ident as the unquoted term.

std/src/collections/hash/map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
12391239
}
12401240

12411241
impl<'a, K, V> IterMut<'a, K, V> {
1242-
/// Returns a iterator of references over the remaining items.
1242+
/// Returns an iterator of references over the remaining items.
12431243
#[inline]
12441244
pub(super) fn iter(&self) -> Iter<'_, K, V> {
12451245
Iter { base: self.base.rustc_iter() }
@@ -1268,7 +1268,7 @@ pub struct IntoIter<K, V> {
12681268
}
12691269

12701270
impl<K, V> IntoIter<K, V> {
1271-
/// Returns a iterator of references over the remaining items.
1271+
/// Returns an iterator of references over the remaining items.
12721272
#[inline]
12731273
pub(super) fn iter(&self) -> Iter<'_, K, V> {
12741274
Iter { base: self.base.rustc_iter() }
@@ -1371,7 +1371,7 @@ pub struct Drain<'a, K: 'a, V: 'a> {
13711371
}
13721372

13731373
impl<'a, K, V> Drain<'a, K, V> {
1374-
/// Returns a iterator of references over the remaining items.
1374+
/// Returns an iterator of references over the remaining items.
13751375
#[inline]
13761376
pub(super) fn iter(&self) -> Iter<'_, K, V> {
13771377
Iter { base: self.base.rustc_iter() }

std/src/ffi/c_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use crate::sys_common::memchr;
4646
///
4747
/// # Extracting a raw pointer to the whole C string
4848
///
49-
/// `CString` implements a [`as_ptr`][`CStr::as_ptr`] method through the [`Deref`]
49+
/// `CString` implements an [`as_ptr`][`CStr::as_ptr`] method through the [`Deref`]
5050
/// trait. This method will give you a `*const c_char` which you can
5151
/// feed directly to extern functions that expect a nul-terminated
5252
/// string, like C's `strdup()`. Notice that [`as_ptr`][`CStr::as_ptr`] returns a
@@ -730,7 +730,7 @@ impl CString {
730730
/// );
731731
/// ```
732732
///
733-
/// A incorrectly formatted [`Vec`] will produce an error.
733+
/// An incorrectly formatted [`Vec`] will produce an error.
734734
///
735735
/// ```
736736
/// #![feature(cstring_from_vec_with_nul)]

std/src/ffi/os_str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl OsString {
359359

360360
#[stable(feature = "rust1", since = "1.0.0")]
361361
impl From<String> for OsString {
362-
/// Converts a [`String`] into a [`OsString`].
362+
/// Converts a [`String`] into an [`OsString`].
363363
///
364364
/// This conversion does not allocate or copy memory.
365365
#[inline]
@@ -880,7 +880,7 @@ impl From<Box<OsStr>> for OsString {
880880

881881
#[stable(feature = "box_from_os_string", since = "1.20.0")]
882882
impl From<OsString> for Box<OsStr> {
883-
/// Converts a [`OsString`] into a [`Box`]`<OsStr>` without copying or allocating.
883+
/// Converts an [`OsString`] into a [`Box`]`<OsStr>` without copying or allocating.
884884
#[inline]
885885
fn from(s: OsString) -> Box<OsStr> {
886886
s.into_boxed_os_str()
@@ -897,7 +897,7 @@ impl Clone for Box<OsStr> {
897897

898898
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
899899
impl From<OsString> for Arc<OsStr> {
900-
/// Converts a [`OsString`] into a [`Arc`]`<OsStr>` without copying or allocating.
900+
/// Converts an [`OsString`] into a [`Arc`]`<OsStr>` without copying or allocating.
901901
#[inline]
902902
fn from(s: OsString) -> Arc<OsStr> {
903903
let arc = s.inner.into_arc();
@@ -916,7 +916,7 @@ impl From<&OsStr> for Arc<OsStr> {
916916

917917
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
918918
impl From<OsString> for Rc<OsStr> {
919-
/// Converts a [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating.
919+
/// Converts an [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating.
920920
#[inline]
921921
fn from(s: OsString) -> Rc<OsStr> {
922922
let rc = s.inner.into_rc();

std/src/net/addr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ impl From<SocketAddrV6> for SocketAddr {
561561
impl<I: Into<IpAddr>> From<(I, u16)> for SocketAddr {
562562
/// Converts a tuple struct (Into<[`IpAddr`]>, `u16`) into a [`SocketAddr`].
563563
///
564-
/// This conversion creates a [`SocketAddr::V4`] for a [`IpAddr::V4`]
565-
/// and creates a [`SocketAddr::V6`] for a [`IpAddr::V6`].
564+
/// This conversion creates a [`SocketAddr::V4`] for an [`IpAddr::V4`]
565+
/// and creates a [`SocketAddr::V6`] for an [`IpAddr::V6`].
566566
///
567567
/// `u16` is treated as port of the newly created [`SocketAddr`].
568568
fn from(pieces: (I, u16)) -> SocketAddr {

std/src/net/ip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl IpAddr {
380380
matches!(self, IpAddr::V6(_))
381381
}
382382

383-
/// Converts this address to an `IpAddr::V4` if it is a IPv4-mapped IPv6 addresses, otherwise it
383+
/// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped IPv6 addresses, otherwise it
384384
/// return `self` as-is.
385385
///
386386
/// # Examples
@@ -1621,8 +1621,8 @@ impl Ipv6Addr {
16211621
}
16221622
}
16231623

1624-
/// Converts this address to an `IpAddr::V4` if it is a IPv4-mapped addresses, otherwise it
1625-
/// returns self wrapped in a `IpAddr::V6`.
1624+
/// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped addresses, otherwise it
1625+
/// returns self wrapped in an `IpAddr::V6`.
16261626
///
16271627
/// # Examples
16281628
///

0 commit comments

Comments
 (0)