Skip to content

Commit a21e056

Browse files
committed
Fixing basic typos in Doc Comments
1 parent 622e7e6 commit a21e056

File tree

68 files changed

+99
-99
lines changed

Some content is hidden

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

68 files changed

+99
-99
lines changed

src/bootstrap/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ impl Build {
635635
}
636636

637637
/// Returns the root output directory for all Cargo output in a given stage,
638-
/// running a particular compiler, wehther or not we're building the
638+
/// running a particular compiler, whether or not we're building the
639639
/// standard library, and targeting the specified architecture.
640640
fn cargo_out(&self,
641641
compiler: &Compiler,
@@ -1036,7 +1036,7 @@ impl Build {
10361036
}
10371037

10381038
impl<'a> Compiler<'a> {
1039-
/// Creates a new complier for the specified stage/host
1039+
/// Creates a new compiler for the specified stage/host
10401040
fn new(stage: u32, host: &'a str) -> Compiler<'a> {
10411041
Compiler { stage: stage, host: host }
10421042
}

src/bootstrap/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Compilation of native dependencies like LLVM.
1212
//!
1313
//! Native projects like LLVM unfortunately aren't suited just yet for
14-
//! compilation in build scripts that Cargo has. This is because thie
14+
//! compilation in build scripts that Cargo has. This is because the
1515
//! compilation takes a *very* long time but also because we don't want to
1616
//! compile LLVM 3 times as part of a normal bootstrap (we want it cached).
1717
//!

src/liballoc/allocator.rs

Lines changed: 4 additions & 4 deletions
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)]
@@ -213,7 +213,7 @@ impl Layout {
213213
///
214214
/// Returns `Some((k, offset))`, where `k` is layout of the concatenated
215215
/// record and `offset` is the relative location, in bytes, of the
216-
/// start of the `next` embedded witnin the concatenated record
216+
/// start of the `next` embedded within the concatenated record
217217
/// (assuming that the record itself starts at offset 0).
218218
///
219219
/// On arithmetic overflow, returns `None`.
@@ -266,11 +266,11 @@ impl Layout {
266266
/// Creates a layout describing the record for `self` followed by
267267
/// `next` with no additional padding between the two. Since no
268268
/// padding is inserted, the alignment of `next` is irrelevant,
269-
/// and is not incoporated *at all* into the resulting layout.
269+
/// and is not incorporated *at all* into the resulting layout.
270270
///
271271
/// Returns `(k, offset)`, where `k` is layout of the concatenated
272272
/// record and `offset` is the relative location, in bytes, of the
273-
/// start of the `next` embedded witnin the concatenated record
273+
/// start of the `next` embedded within the concatenated record
274274
/// (assuming that the record itself starts at offset 0).
275275
///
276276
/// (The `offset` is always the same as `self.size()`; we use this

src/liballoc/btree/node.rs

Lines changed: 3 additions & 3 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>>
@@ -270,7 +270,7 @@ impl<K, V> Root<K, V> {
270270
// correct variance.
271271
/// A reference to a node.
272272
///
273-
/// This type has a number of paramaters that controls how it acts:
273+
/// This type has a number of parameters that controls how it acts:
274274
/// - `BorrowType`: This can be `Immut<'a>` or `Mut<'a>` for some `'a` or `Owned`.
275275
/// When this is `Immut<'a>`, the `NodeRef` acts roughly like `&'a Node`,
276276
/// when this is `Mut<'a>`, the `NodeRef` acts roughly like `&'a mut Node`,
@@ -775,7 +775,7 @@ impl<Node: Copy, Type> Clone for Handle<Node, Type> {
775775
}
776776

777777
impl<Node, Type> Handle<Node, Type> {
778-
/// Retrieves the node that contains the edge of key/value pair this handle pointes to.
778+
/// Retrieves the node that contains the edge of key/value pair this handle points to.
779779
pub fn into_node(self) -> Node {
780780
self.node
781781
}

src/libcore/iter/mod.rs

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

src/libcore/iter/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ pub trait Extend<A> {
362362
/// In a similar fashion to the [`Iterator`] protocol, once a
363363
/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again
364364
/// may or may not ever return `Some` again. `next()` and `next_back()` are
365-
/// interchangable for this purpose.
365+
/// interchangeable for this purpose.
366366
///
367367
/// [`Iterator`]: trait.Iterator.html
368368
///

src/libcore/num/dec2flt/rawfp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp
102102
/// The number of bits in the exponent.
103103
const EXP_BITS: u8;
104104

105-
/// The number of bits in the singificand, *including* the hidden bit.
105+
/// The number of bits in the significand, *including* the hidden bit.
106106
const SIG_BITS: u8;
107107

108-
/// The number of bits in the singificand, *excluding* the hidden bit.
108+
/// The number of bits in the significand, *excluding* the hidden bit.
109109
const EXPLICIT_SIG_BITS: u8;
110110

111111
/// The maximum legal exponent in fractional representation.
@@ -123,7 +123,7 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp
123123
/// `MIN_EXP` for integral representation, i.e., with the shift applied.
124124
const MIN_EXP_INT: i16;
125125

126-
/// The maximum normalized singificand in integral representation.
126+
/// The maximum normalized significand in integral representation.
127127
const MAX_SIG: u64;
128128

129129
/// The minimal normalized significand in integral representation.

src/libcore/ops/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub trait Place<Data: ?Sized> {
5959
/// or `Copy`, since the `make_place` method takes `self` by value.
6060
#[unstable(feature = "placement_new_protocol", issue = "27779")]
6161
pub trait Placer<Data: ?Sized> {
62-
/// `Place` is the intermedate agent guarding the
62+
/// `Place` is the intermediate agent guarding the
6363
/// uninitialized state for `Data`.
6464
type Place: InPlace<Data>;
6565

src/libcore/sync/atomic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
16321632
///
16331633
/// pub fn lock(&self) {
16341634
/// while !self.flag.compare_and_swap(false, true, Ordering::Relaxed) {}
1635-
/// // This fence syncronizes-with store in `unlock`.
1635+
/// // This fence synchronizes-with store in `unlock`.
16361636
/// fence(Ordering::Acquire);
16371637
/// }
16381638
///

src/librustc/hir/intravisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub enum NestedVisitorMap<'this, 'tcx: 'this> {
8787
/// Do not visit nested item-like things, but visit nested things
8888
/// that are inside of an item-like.
8989
///
90-
/// **This is the most common choice.** A very commmon pattern is
90+
/// **This is the most common choice.** A very common pattern is
9191
/// to use `visit_all_item_likes()` as an outer loop,
9292
/// and to have the visitor that visits the contents of each item
9393
/// using this setting.

0 commit comments

Comments
 (0)