Skip to content

Commit bffc973

Browse files
committed
Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperio
Fix some typos I wrote a really naive script and found those typos in the documentation.
2 parents 2fa5340 + ea5be96 commit bffc973

File tree

24 files changed

+27
-27
lines changed

24 files changed

+27
-27
lines changed

src/liballoc/allocator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn size_align<T>() -> (usize, usize) {
4040
///
4141
/// (Note however that layouts are *not* required to have positive
4242
/// size, even though many allocators require that all memory
43-
/// requeusts have positive size. A caller to the `Alloc::alloc`
43+
/// requests have positive size. A caller to the `Alloc::alloc`
4444
/// method must either ensure that conditions like this are met, or
4545
/// use specific allocators with looser requirements.)
4646
#[derive(Clone, Debug, PartialEq, Eq)]

src/liballoc/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<K, V> InternalNode<K, V> {
132132

133133
/// An owned pointer to a node. This basically is either `Box<LeafNode<K, V>>` or
134134
/// `Box<InternalNode<K, V>>`. However, it contains no information as to which of the two types
135-
/// of nodes is acutally behind the box, and, partially due to this lack of information, has no
135+
/// of nodes is actually behind the box, and, partially due to this lack of information, has no
136136
/// destructor.
137137
struct BoxedNode<K, V> {
138138
ptr: Unique<LeafNode<K, V>>
@@ -264,7 +264,7 @@ impl<K, V> Root<K, V> {
264264
// correct variance.
265265
/// A reference to a node.
266266
///
267-
/// This type has a number of paramaters that controls how it acts:
267+
/// This type has a number of parameters that controls how it acts:
268268
/// - `BorrowType`: This can be `Immut<'a>` or `Mut<'a>` for some `'a` or `Owned`.
269269
/// When this is `Immut<'a>`, the `NodeRef` acts roughly like `&'a Node`,
270270
/// when this is `Mut<'a>`, the `NodeRef` acts roughly like `&'a mut Node`,

src/libcore/iter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ unsafe impl<A, B> TrustedLen for Zip<A, B>
10351035
/// Now consider this twist where we add a call to `rev`. This version will
10361036
/// print `('c', 1), ('b', 2), ('a', 3)`. Note that the letters are reversed,
10371037
/// but the values of the counter still go in order. This is because `map()` is
1038-
/// still being called lazilly on each item, but we are popping items off the
1038+
/// still being called lazily on each item, but we are popping items off the
10391039
/// back of the vector now, instead of shifting them from the front.
10401040
///
10411041
/// ```rust

src/libcore/iter/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ pub trait Extend<A> {
345345
/// In a similar fashion to the [`Iterator`] protocol, once a
346346
/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again
347347
/// may or may not ever return `Some` again. `next()` and `next_back()` are
348-
/// interchangable for this purpose.
348+
/// interchangeable for this purpose.
349349
///
350350
/// [`Iterator`]: trait.Iterator.html
351351
///

src/libcore/num/dec2flt/algorithm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pub fn algorithm_m<T: RawFloat>(f: &Big, e: i16) -> T {
336336
round_by_remainder(v, rem, q, z)
337337
}
338338

339-
/// Skip over most AlgorithmM iterations by checking the bit length.
339+
/// Skip over most Algorithm M iterations by checking the bit length.
340340
fn quick_start<T: RawFloat>(u: &mut Big, v: &mut Big, k: &mut i16) {
341341
// The bit length is an estimate of the base two logarithm, and log(u / v) = log(u) - log(v).
342342
// The estimate is off by at most 1, but always an under-estimate, so the error on log(u)

src/libcore/ops/unsize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use marker::Unsize;
2424
/// Such an impl can only be written if `Foo<T>` has only a single non-phantomdata
2525
/// field involving `T`. If the type of that field is `Bar<T>`, an implementation
2626
/// of `CoerceUnsized<Bar<U>> for Bar<T>` must exist. The coercion will work by
27-
/// by coercing the `Bar<T>` field into `Bar<U>` and filling in the rest of the fields
27+
/// coercing the `Bar<T>` field into `Bar<U>` and filling in the rest of the fields
2828
/// from `Foo<T>` to create a `Foo<U>`. This will effectively drill down to a pointer
2929
/// field and coerce that.
3030
///

src/libcore/tests/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ assume_usize_width! {
566566
);
567567
}
568568

569-
/// Conversinos where neither the min nor the max of $source can be represented by
569+
/// Conversions where neither the min nor the max of $source can be represented by
570570
/// $target, but max/min of the target can be represented by the source.
571571
macro_rules! test_impl_try_from_signed_to_unsigned_err {
572572
($fn_name:ident, $source:ty, $target:ty) => {

src/libproc_macro/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl fmt::Display for TokenStream {
111111

112112
/// `quote!(..)` accepts arbitrary tokens and expands into a `TokenStream` describing the input.
113113
/// For example, `quote!(a + b)` will produce a expression, that, when evaluated, constructs
114-
/// constructs the `TokenStream` `[Word("a"), Op('+', Alone), Word("b")]`.
114+
/// the `TokenStream` `[Word("a"), Op('+', Alone), Word("b")]`.
115115
///
116116
/// Unquoting is done with `$`, and works by taking the single next ident as the unquoted term.
117117
/// To quote `$` itself, use `$$`.

src/librustc/traits/specialize/specialization_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use util::nodemap::{DefIdMap, FxHashMap};
3131
///
3232
/// - Parent extraction. In particular, the graph can give you the *immediate*
3333
/// parents of a given specializing impl, which is needed for extracting
34-
/// default items amongst other thigns. In the simple "chain" rule, every impl
34+
/// default items amongst other things. In the simple "chain" rule, every impl
3535
/// has at most one parent.
3636
pub struct Graph {
3737
// all impls have a parent; the "root" impls have as their parent the def_id

src/librustc/ty/adjustment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use ty::subst::Substs;
2929
/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is
3030
/// `false`.
3131
///
32-
/// 2. A thin-to-fat coercon involves unsizing the underlying data. We start
32+
/// 2. A thin-to-fat coercion involves unsizing the underlying data. We start
3333
/// with a thin pointer, deref a number of times, unsize the underlying data,
3434
/// then autoref. The 'unsize' phase may change a fixed length array to a
3535
/// dynamically sized one, a concrete object to a trait object, or statically
@@ -52,7 +52,7 @@ use ty::subst::Substs;
5252
/// that case, we have the pointer we need coming in, so there are no
5353
/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation.
5454
/// At some point, of course, `Box` should move out of the compiler, in which
55-
/// case this is analogous to transformating a struct. E.g., Box<[i32; 4]> ->
55+
/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> ->
5656
/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`.
5757
#[derive(Clone, RustcEncodable, RustcDecodable)]
5858
pub struct Adjustment<'tcx> {

0 commit comments

Comments
 (0)