Skip to content

Commit c7104be

Browse files
committed
Fix typos & us spellings
1 parent 82be83c commit c7104be

File tree

47 files changed

+59
-59
lines changed

Some content is hidden

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

47 files changed

+59
-59
lines changed

src/bootstrap/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ impl Build {
444444
}
445445

446446
/// Returns the root output directory for all Cargo output in a given stage,
447-
/// running a particular compiler, wehther or not we're building the
447+
/// running a particular compiler, whether or not we're building the
448448
/// standard library, and targeting the specified architecture.
449449
fn cargo_out(&self,
450450
compiler: Compiler,

src/bootstrap/native.rs

+1-1
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl Layout {
293293
/// Creates a layout describing the record for `self` followed by
294294
/// `next` with no additional padding between the two. Since no
295295
/// padding is inserted, the alignment of `next` is irrelevant,
296-
/// and is not incoporated *at all* into the resulting layout.
296+
/// and is not incorporated *at all* into the resulting layout.
297297
///
298298
/// Returns `(k, offset)`, where `k` is layout of the concatenated
299299
/// record and `offset` is the relative location, in bytes, of the
@@ -528,7 +528,7 @@ pub unsafe trait Alloc {
528528
/// to allocate that block of memory.
529529
unsafe fn dealloc(&mut self, ptr: *mut u8, layout: Layout);
530530

531-
/// Allocator-specific method for signalling an out-of-memory
531+
/// Allocator-specific method for signaling an out-of-memory
532532
/// condition.
533533
///
534534
/// `oom` aborts the thread or process, optionally performing
@@ -539,7 +539,7 @@ pub unsafe trait Alloc {
539539
/// unsatisfied allocation request (signaled by an error such as
540540
/// `AllocErr::Exhausted`), and wish to abandon computation rather
541541
/// than attempt to recover locally. Such clients should pass the
542-
/// signalling error value back into `oom`, where the allocator
542+
/// signaling error value back into `oom`, where the allocator
543543
/// may incorporate that error value into its diagnostic report
544544
/// before aborting.
545545
///

src/liballoc/btree/node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ impl<Node: Copy, Type> Clone for Handle<Node, Type> {
763763
}
764764

765765
impl<Node, Type> Handle<Node, Type> {
766-
/// Retrieves the node that contains the edge of key/value pair this handle pointes to.
766+
/// Retrieves the node that contains the edge of key/value pair this handle points to.
767767
pub fn into_node(self) -> Node {
768768
self.node
769769
}

src/liballoc/raw_vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,12 @@ impl<T, A: Alloc> RawVec<T, A> {
544544
/// Attempts to ensure that the buffer contains at least enough space to hold
545545
/// `used_cap + needed_extra_cap` elements. If it doesn't already have
546546
/// enough capacity, will reallocate in place enough space plus comfortable slack
547-
/// space to get amortized `O(1)` behaviour. Will limit this behaviour
547+
/// space to get amortized `O(1)` behavior. Will limit this behaviour
548548
/// if it would needlessly cause itself to panic.
549549
///
550550
/// If `used_cap` exceeds `self.cap()`, this may fail to actually allocate
551551
/// the requested space. This is not really unsafe, but the unsafe
552-
/// code *you* write that relies on the behaviour of this function may break.
552+
/// code *you* write that relies on the behavior of this function may break.
553553
///
554554
/// Returns true if the reallocation attempt has succeeded, or false otherwise.
555555
///

src/libcore/num/dec2flt/rawfp.rs

+3-3
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/try.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
/// A trait for customizing the behaviour of the `?` operator.
11+
/// A trait for customizing the behavior of the `?` operator.
1212
///
1313
/// A type implementing `Try` is one that has a canonical way to view it
1414
/// in terms of a success/failure dichotomy. This trait allows both

src/libcore/sync/atomic.rs

+1-1
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/libgraphviz/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Generate files suitable for use with [Graphviz](http://www.graphviz.org/)
1212
//!
1313
//! The `render` function generates output (e.g. an `output.dot` file) for
14-
//! use with [Graphviz](http://www.graphviz.org/) by walking a labelled
14+
//! use with [Graphviz](http://www.graphviz.org/) by walking a labeled
1515
//! graph. (Graphviz can then automatically lay out the nodes and edges
1616
//! of the graph, and also optionally render the graph as an image or
1717
//! other [output formats](
@@ -150,7 +150,7 @@
150150
//!
151151
//! The output from this example renders four nodes that make up the
152152
//! Hasse-diagram for the subsets of the set `{x, y}`. Each edge is
153-
//! labelled with the &sube; character (specified using the HTML character
153+
//! labeled with the &sube; character (specified using the HTML character
154154
//! entity `&sube`).
155155
//!
156156
//! ```rust
@@ -789,7 +789,7 @@ mod tests {
789789
}
790790

791791
struct LabelledGraph {
792-
/// The name for this graph. Used for labelling generated `digraph`.
792+
/// The name for this graph. Used for labeling generated `digraph`.
793793
name: &'static str,
794794

795795
/// Each node is an index into `node_labels`; these labels are

src/librand/distributions/gamma.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl IndependentSample<f64> for ChiSquared {
254254

255255
/// The Fisher F distribution `F(m, n)`.
256256
///
257-
/// This distribution is equivalent to the ratio of two normalised
257+
/// This distribution is equivalent to the ratio of two normalized
258258
/// chi-squared distributions, that is, `F(m,n) = (χ²(m)/m) /
259259
/// (χ²(n)/n)`.
260260
pub struct FisherF {

src/librand/isaac.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl IsaacRng {
7676
rng
7777
}
7878

79-
/// Initialises `self`. If `use_rsl` is true, then use the current value
79+
/// Initializes `self`. If `use_rsl` is true, then use the current value
8080
/// of `rsl` as a seed, otherwise construct one algorithmically (not
8181
/// randomly).
8282
fn init(&mut self, use_rsl: bool) {
@@ -367,7 +367,7 @@ impl Isaac64Rng {
367367
rng
368368
}
369369

370-
/// Initialises `self`. If `use_rsl` is true, then use the current value
370+
/// Initializes `self`. If `use_rsl` is true, then use the current value
371371
/// of `rsl` as a seed, otherwise construct one algorithmically (not
372372
/// randomly).
373373
fn init(&mut self, use_rsl: bool) {

src/librand/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub trait Rng: Sized {
180180
/// This method does *not* have a requirement to bear any fixed
181181
/// relationship to the other methods, for example, it does *not*
182182
/// have to result in the same output as progressively filling
183-
/// `dest` with `self.gen::<u8>()`, and any such behaviour should
183+
/// `dest` with `self.gen::<u8>()`, and any such behavior should
184184
/// not be relied upon.
185185
///
186186
/// This method should guarantee that `dest` is entirely filled

src/librand/reseeding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct ReseedingRng<R, Rsdr> {
2424
rng: R,
2525
generation_threshold: usize,
2626
bytes_generated: usize,
27-
/// Controls the behaviour when reseeding the RNG.
27+
/// Controls the behavior when reseeding the RNG.
2828
pub reseeder: Rsdr,
2929
}
3030

src/librustc/hir/map/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ impl<'hir> Map<'hir> {
731731

732732
/// Returns the nearest enclosing scope. A scope is an item or block.
733733
/// FIXME it is not clear to me that all items qualify as scopes - statics
734-
/// and associated types probably shouldn't, for example. Behaviour in this
734+
/// and associated types probably shouldn't, for example. Behavior in this
735735
/// regard should be expected to be highly unstable.
736736
pub fn get_enclosing_scope(&self, id: NodeId) -> Option<NodeId> {
737737
match self.walk_parent_nodes(id, |node| match *node {

src/librustc/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! a span, but also more information so that we can generate a meaningful
2525
//! error message.
2626
//!
27-
//! Having a catalogue of all the different reasons an error can arise is
27+
//! Having a catalog of all the different reasons an error can arise is
2828
//! also useful for other reasons, like cross-referencing FAQs etc, though
2929
//! we are not really taking advantage of this yet.
3030
//!

src/librustc/infer/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for OpportunisticTypeResolver<'a, 'g
4646
}
4747

4848
/// The opportunistic type and region resolver is similar to the
49-
/// opportunistic type resolver, but also opportunistly resolves
49+
/// opportunistic type resolver, but also opportunistically resolves
5050
/// regions. It is useful for canonicalization.
5151
pub struct OpportunisticTypeAndRegionResolver<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
5252
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,

src/librustc/lint/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub struct FutureIncompatibleInfo {
101101
pub reference: &'static str // e.g., a URL for an issue/PR/RFC or error code
102102
}
103103

104-
/// The targed of the `by_name` map, which accounts for renaming/deprecation.
104+
/// The target of the `by_name` map, which accounts for renaming/deprecation.
105105
enum TargetLint {
106106
/// A direct lint target
107107
Id(LintId),

src/librustc/middle/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use mir::transform::MirSource;
7272
/// (M1.): Misc extent of the whole `let a = ...;` statement.
7373
/// (M2.): Misc extent of the `f()` expression.
7474
/// (M3.): Misc extent of the `f().g(..)` expression.
75-
/// (M4.): Misc extent of the block labelled `'b:`.
75+
/// (M4.): Misc extent of the block labeled `'b:`.
7676
/// (M5.): Misc extent of the `let x = d();` statement
7777
/// (D6.): DestructionScope for temporaries created during M5.
7878
/// (R7.): Remainder extent for block `'b:`, stmt 0 (let x = ...).

src/librustc/mir/traversal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> {
216216
///
217217
/// Reverse postorder is the reverse order of a postorder traversal.
218218
/// This is different to a preorder traversal and represents a natural
219-
/// linearisation of control-flow.
219+
/// linearization of control-flow.
220220
///
221221
/// ```text
222222
///

src/librustc/traits/fulfill.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<'tcx> ForestObligation for PendingPredicateObligation<'tcx> {
3737
/// consists of a list of obligations that must be (eventually)
3838
/// satisfied. The job is to track which are satisfied, which yielded
3939
/// errors, and which are still pending. At any point, users can call
40-
/// `select_where_possible`, and the fulfilment context will try to do
40+
/// `select_where_possible`, and the fulfillment context will try to do
4141
/// selection, retaining only those obligations that remain
4242
/// ambiguous. This may be helpful in pushing type inference
4343
/// along. Once all type inference constraints have been generated, the

src/librustc/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ pub struct GlobalCtxt<'tcx> {
851851

852852
/// A vector of every trait accessible in the whole crate
853853
/// (i.e. including those from subcrates). This is used only for
854-
/// error reporting, and so is lazily initialised and generally
854+
/// error reporting, and so is lazily initialized and generally
855855
/// shouldn't taint the common path (hence the RefCell).
856856
pub all_traits: RefCell<Option<Vec<DefId>>>,
857857
}

src/librustc/ty/inhabitedness/def_id_forest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct DefIdForest {
2626
/// The minimal set of DefIds required to represent the whole set.
2727
/// If A and B are DefIds in the DefIdForest, and A is a descendant
2828
/// of B, then only B will be in root_ids.
29-
/// We use a SmallVec here because (for its use for cacheing inhabitedness)
29+
/// We use a SmallVec here because (for its use for caching inhabitedness)
3030
/// its rare that this will contain even two ids.
3131
root_ids: SmallVec<[DefId; 1]>,
3232
}

src/librustc/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ pub type Region<'tcx> = &'tcx RegionKind;
739739
///
740740
/// The process of doing that is called "skolemization". The bound regions
741741
/// are replaced by skolemized markers, which don't satisfy any relation
742-
/// not explicity provided.
742+
/// not explicitly provided.
743743
///
744744
/// There are 2 kinds of skolemized regions in rustc: `ReFree` and
745745
/// `ReSkolemized`. When checking an item's body, `ReFree` is supposed

src/librustc_data_structures/accumulate_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! Space for up to N elements is provided on the stack. If more elements are collected, Vec is
1414
//! used to store the values on the heap.
1515
//!
16-
//! The N above is determined by Array's implementor, by way of an associatated constant.
16+
//! The N above is determined by Array's implementor, by way of an associated constant.
1717
1818
use std::ops::{Deref, DerefMut};
1919
use std::iter::{self, IntoIterator, FromIterator};

src/librustc_data_structures/ivar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::cell::Cell;
1414
/// A write-once variable. When constructed, it is empty, and
1515
/// can only be set once.
1616
///
17-
/// Ivars ensure that data that can only be initialised once. A full
17+
/// Ivars ensure that data that can only be initialized once. A full
1818
/// implementation is used for concurrency and blocks on a read of an
1919
/// unfulfilled value. This implementation is more minimal and panics
2020
/// if you attempt to read the value before it has been set. It is also

src/librustc_data_structures/small_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! used to store the values on the heap. SmallVec is similar to AccumulateVec, but adds
1515
//! the ability to push elements.
1616
//!
17-
//! The N above is determined by Array's implementor, by way of an associatated constant.
17+
//! The N above is determined by Array's implementor, by way of an associated constant.
1818
1919
use std::ops::{Deref, DerefMut};
2020
use std::iter::{IntoIterator, FromIterator};

src/librustc_driver/driver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub fn source_name(input: &Input) -> String {
306306
}
307307
}
308308

309-
/// CompileController is used to customise compilation, it allows compilation to
309+
/// CompileController is used to customize compilation, it allows compilation to
310310
/// be stopped and/or to call arbitrary code at various points in compilation.
311311
/// It also allows for various flags to be set to influence what information gets
312312
/// collected during compilation.

src/librustc_errors/diagnostic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ impl Diagnostic {
9393
}
9494

9595
/// Cancel the diagnostic (a structured diagnostic must either be emitted or
96-
/// cancelled or it will panic when dropped).
96+
/// canceled or it will panic when dropped).
9797
/// BEWARE: if this DiagnosticBuilder is an error, then creating it will
98-
/// bump the error count on the Handler and cancelling it won't undo that.
98+
/// bump the error count on the Handler and canceling it won't undo that.
9999
/// If you want to decrement the error count you should use `Handler::cancel`.
100100
pub fn cancel(&mut self) {
101101
self.level = Level::Cancelled;

src/librustc_errors/diagnostic_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl<'a> Debug for DiagnosticBuilder<'a> {
198198
}
199199
}
200200

201-
/// Destructor bomb - a `DiagnosticBuilder` must be either emitted or cancelled
201+
/// Destructor bomb - a `DiagnosticBuilder` must be either emitted or canceled
202202
/// or we emit a bug.
203203
impl<'a> Drop for DiagnosticBuilder<'a> {
204204
fn drop(&mut self) {

src/librustc_errors/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ impl EmitterWriter {
822822
.map(|_| " ")
823823
.collect::<String>();
824824

825-
/// Return wether `style`, or the override if present and the style is `NoStyle`.
825+
/// Return whether `style`, or the override if present and the style is `NoStyle`.
826826
fn style_or_override(style: Style, override_style: Option<Style>) -> Style {
827827
if let Some(o) = override_style {
828828
if style == Style::NoStyle {

src/librustc_errors/snippet.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub struct Annotation {
141141
}
142142

143143
impl Annotation {
144-
/// Wether this annotation is a vertical line placeholder.
144+
/// Whether this annotation is a vertical line placeholder.
145145
pub fn is_line(&self) -> bool {
146146
if let AnnotationType::MultilineLine(_) = self.annotation_type {
147147
true

src/librustc_incremental/persist/preds/compress/construct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! representation of the DAG):
1515
//!
1616
//! - SCCs, in the form of a union-find repr that can convert each node to
17-
//! its *cycle head* (an arbitrarly chosen representative from the cycle)
17+
//! its *cycle head* (an arbitrarily chosen representative from the cycle)
1818
//! - a vector of *leaf nodes*, just a convenience
1919
//! - a vector of *parents* for each node (in some cases, nodes have no parents,
2020
//! or their parent is another member of same cycle; in that case, the vector

src/librustc_trans/attributes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn unwind(val: ValueRef, can_unwind: bool) {
4747
Attribute::NoUnwind.toggle_llfn(Function, val, !can_unwind);
4848
}
4949

50-
/// Tell LLVM whether it should optimise function for size.
50+
/// Tell LLVM whether it should optimize function for size.
5151
#[inline]
5252
#[allow(dead_code)] // possibly useful function
5353
pub fn set_optimize_for_size(val: ValueRef, optimize: bool) {

src/librustc_trans/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ fn check_for_rustc_errors_attr(tcx: TyCtxt) {
664664
}
665665
}
666666

667-
/// Create the `main` function which will initialise the rust runtime and call
667+
/// Create the `main` function which will initialize the rust runtime and call
668668
/// users main function.
669669
fn maybe_create_entry_wrapper(ccx: &CrateContext) {
670670
let (main_def_id, span) = match *ccx.sess().entry_fn.borrow() {

src/librustc_trans/debuginfo/doc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
//! encounters a recursive reference, it will hit the cache and does not try to
9393
//! describe the type anew.
9494
//!
95-
//! This behaviour is encapsulated in the 'RecursiveTypeDescription' enum,
95+
//! This behavior is encapsulated in the 'RecursiveTypeDescription' enum,
9696
//! which represents a kind of continuation, storing all state needed to
9797
//! continue traversal at the type members after the type has been registered
9898
//! with the cache. (This implementation approach might be a tad over-
@@ -156,13 +156,13 @@
156156
//! (2) Structs, enums and traits have a multipart identifier
157157
//!
158158
//! (1) The first part is the SVH (strict version hash) of the crate they
159-
//! wereoriginally defined in
159+
//! were originally defined in
160160
//!
161161
//! (2) The second part is the ast::NodeId of the definition in their
162-
//! originalcrate
162+
//! original crate
163163
//!
164164
//! (3) The final part is a concatenation of the type IDs of their concrete
165-
//! typearguments if they are generic types.
165+
//! type arguments if they are generic types.
166166
//!
167167
//! (3) Tuple-, pointer and function types are structurally identified, which
168168
//! means that they are equivalent if their component types are equivalent

0 commit comments

Comments
 (0)