1
Fork 0

fix typos in various places

This commit is contained in:
Matthias Krüger 2018-10-22 18:21:55 +02:00
parent d74b40205f
commit 4972beaf65
43 changed files with 77 additions and 77 deletions

View file

@ -594,7 +594,7 @@ class RustBuild(object):
return '' return ''
def bootstrap_binary(self): def bootstrap_binary(self):
"""Return the path of the boostrap binary """Return the path of the bootstrap binary
>>> rb = RustBuild() >>> rb = RustBuild()
>>> rb.build_dir = "build" >>> rb.build_dir = "build"

View file

@ -277,7 +277,7 @@ def print_std_string_val(val, internal_dict):
#=-------------------------------------------------------------------------------------------------- #=--------------------------------------------------------------------------------------------------
def print_array_of_values(array_name, data_ptr_val, length, internal_dict): def print_array_of_values(array_name, data_ptr_val, length, internal_dict):
"""Prints a contigous memory range, interpreting it as values of the """Prints a contiguous memory range, interpreting it as values of the
pointee-type of data_ptr_val.""" pointee-type of data_ptr_val."""
data_ptr_type = data_ptr_val.type data_ptr_type = data_ptr_val.type

View file

@ -518,7 +518,7 @@ pub unsafe trait GlobalAlloc {
/// The block is described by the given `ptr` pointer and `layout`. /// The block is described by the given `ptr` pointer and `layout`.
/// ///
/// If this returns a non-null pointer, then ownership of the memory block /// If this returns a non-null pointer, then ownership of the memory block
/// referenced by `ptr` has been transferred to this alloctor. /// referenced by `ptr` has been transferred to this allocator.
/// The memory may or may not have been deallocated, /// The memory may or may not have been deallocated,
/// and should be considered unusable (unless of course it was /// and should be considered unusable (unless of course it was
/// transferred back to the caller again via the return value of /// transferred back to the caller again via the return value of

View file

@ -1025,7 +1025,7 @@ extern "rust-intrinsic" {
/// // to avoid problems in case something further down panics. /// // to avoid problems in case something further down panics.
/// src.set_len(0); /// src.set_len(0);
/// ///
/// // The two regions cannot overlap becuase mutable references do /// // The two regions cannot overlap because mutable references do
/// // not alias, and two different vectors cannot own the same /// // not alias, and two different vectors cannot own the same
/// // memory. /// // memory.
/// ptr::copy_nonoverlapping(src_ptr, dst_ptr, src_len); /// ptr::copy_nonoverlapping(src_ptr, dst_ptr, src_len);

View file

@ -102,7 +102,7 @@ pub use marker::Unpin;
/// value in place, preventing the value referenced by that pointer from being moved /// value in place, preventing the value referenced by that pointer from being moved
/// unless it implements [`Unpin`]. /// unless it implements [`Unpin`].
/// ///
/// See the [`pin` module] documentation for furthur explanation on pinning. /// See the [`pin` module] documentation for further explanation on pinning.
/// ///
/// [`Unpin`]: ../../std/marker/trait.Unpin.html /// [`Unpin`]: ../../std/marker/trait.Unpin.html
/// [`pin` module]: ../../std/pin/index.html /// [`pin` module]: ../../std/pin/index.html

View file

@ -38,7 +38,7 @@
//! underlying object is live and no reference (just raw pointers) is used to //! underlying object is live and no reference (just raw pointers) is used to
//! access the same memory. //! access the same memory.
//! //!
//! These axioms, along with careful use of [`offset`] for pointer arithmentic, //! These axioms, along with careful use of [`offset`] for pointer arithmetic,
//! are enough to correctly implement many useful things in unsafe code. Stronger guarantees //! are enough to correctly implement many useful things in unsafe code. Stronger guarantees
//! will be provided eventually, as the [aliasing] rules are being determined. For more //! will be provided eventually, as the [aliasing] rules are being determined. For more
//! information, see the [book] as well as the section in the reference devoted //! information, see the [book] as well as the section in the reference devoted

View file

@ -40,7 +40,7 @@ impl ::std::fmt::Debug for CrateNum {
match self { match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private), CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
CrateNum::Invalid => write!(fmt, "invalid crate"), CrateNum::Invalid => write!(fmt, "invalid crate"),
CrateNum::BuiltinMacros => write!(fmt, "bultin macros crate"), CrateNum::BuiltinMacros => write!(fmt, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"), CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"),
} }
} }
@ -101,7 +101,7 @@ impl fmt::Display for CrateNum {
match self { match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f), CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
CrateNum::Invalid => write!(f, "invalid crate"), CrateNum::Invalid => write!(f, "invalid crate"),
CrateNum::BuiltinMacros => write!(f, "bultin macros crate"), CrateNum::BuiltinMacros => write!(f, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"), CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"),
} }
} }

View file

@ -632,7 +632,7 @@ pub fn read_target_uint(endianness: layout::Endian, mut source: &[u8]) -> Result
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Methods to faciliate working with signed integers stored in a u128 // Methods to facilitate working with signed integers stored in a u128
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
pub fn sign_extend(value: u128, size: Size) -> u128 { pub fn sign_extend(value: u128, size: Size) -> u128 {

View file

@ -469,7 +469,7 @@ pub enum BorrowKind {
/// } /// }
/// ///
/// This can't be a shared borrow because mutably borrowing (*x as Some).0 /// This can't be a shared borrow because mutably borrowing (*x as Some).0
/// should not prevent `if let None = x { ... }`, for example, becase the /// should not prevent `if let None = x { ... }`, for example, because the
/// mutating `(*x as Some).0` can't affect the discriminant of `x`. /// mutating `(*x as Some).0` can't affect the discriminant of `x`.
/// We can also report errors with this kind of borrow differently. /// We can also report errors with this kind of borrow differently.
Shallow, Shallow,

View file

@ -412,7 +412,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
flags.push(("crate_local".to_owned(), None)); flags.push(("crate_local".to_owned(), None));
} }
// Allow targetting all integers using `{integral}`, even if the exact type was resolved // Allow targeting all integers using `{integral}`, even if the exact type was resolved
if self_ty.is_integral() { if self_ty.is_integral() {
flags.push(("_Self".to_owned(), Some("{integral}".to_owned()))); flags.push(("_Self".to_owned(), Some("{integral}".to_owned())));
} }

View file

@ -761,7 +761,7 @@ impl Builder<'a, 'll, 'tcx> {
fty, asm, cons, volatile, alignstack, dia); fty, asm, cons, volatile, alignstack, dia);
Some(self.call(v, inputs, None)) Some(self.call(v, inputs, None))
} else { } else {
// LLVM has detected an issue with our constaints, bail out // LLVM has detected an issue with our constraints, bail out
None None
} }
} }

View file

@ -68,7 +68,7 @@ macro_rules! provide {
let $cdata = $tcx.crate_data_as_rc_any($def_id.krate); let $cdata = $tcx.crate_data_as_rc_any($def_id.krate);
let $cdata = $cdata.downcast_ref::<cstore::CrateMetadata>() let $cdata = $cdata.downcast_ref::<cstore::CrateMetadata>()
.expect("CrateStore crated ata is not a CrateMetadata"); .expect("CrateStore created data is not a CrateMetadata");
$compute $compute
})* })*

View file

@ -129,7 +129,7 @@ pub fn op_to_const<'tcx>(
assert!(alloc.bytes.len() as u64 - ptr.offset.bytes() >= op.layout.size.bytes()); assert!(alloc.bytes.len() as u64 - ptr.offset.bytes() >= op.layout.size.bytes());
let mut alloc = alloc.clone(); let mut alloc = alloc.clone();
alloc.align = align; alloc.align = align;
// FIXME shouldnt it be the case that `mark_static_initialized` has already // FIXME shouldn't it be the case that `mark_static_initialized` has already
// interned this? I thought that is the entire point of that `FinishStatic` stuff? // interned this? I thought that is the entire point of that `FinishStatic` stuff?
let alloc = ecx.tcx.intern_const_alloc(alloc); let alloc = ecx.tcx.intern_const_alloc(alloc);
ConstValue::ByRef(ptr.alloc_id, alloc, ptr.offset) ConstValue::ByRef(ptr.alloc_id, alloc, ptr.offset)

View file

@ -2279,7 +2279,7 @@ fn demo<'a>(s: &'a mut S<'a>) -> &'a mut String { let p = &mut *(*s).data; p }
Note that this approach needs a reference to S with lifetime `'a`. Note that this approach needs a reference to S with lifetime `'a`.
Nothing shorter than `'a` will suffice: a shorter lifetime would imply Nothing shorter than `'a` will suffice: a shorter lifetime would imply
that after `demo` finishes excuting, something else (such as the that after `demo` finishes executing, something else (such as the
destructor!) could access `s.data` after the end of that shorter destructor!) could access `s.data` after the end of that shorter
lifetime, which would again violate the `&mut`-borrow's exclusive lifetime, which would again violate the `&mut`-borrow's exclusive
access. access.

View file

@ -556,7 +556,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
)?; )?;
} }
} else { } else {
// Uh, that shouln't happen... the function did not intend to return // Uh, that shouldn't happen... the function did not intend to return
return err!(Unreachable); return err!(Unreachable);
} }

View file

@ -94,7 +94,7 @@ impl<'a, 'b, 'c, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> HasDataLayout
} }
} }
// FIXME: Really we shouldnt clone memory, ever. Snapshot machinery should instad // FIXME: Really we shouldn't clone memory, ever. Snapshot machinery should instead
// carefully copy only the reachable parts. // carefully copy only the reachable parts.
impl<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> impl<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>>
Clone for Memory<'a, 'mir, 'tcx, M> Clone for Memory<'a, 'mir, 'tcx, M>
@ -658,7 +658,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
} }
/// It is the caller's responsibility to handle undefined and pointer bytes. /// It is the caller's responsibility to handle undefined and pointer bytes.
/// However, this still checks that there are no relocations on the *egdes*. /// However, this still checks that there are no relocations on the *edges*.
#[inline] #[inline]
fn get_bytes_with_undef_and_ptr( fn get_bytes_with_undef_and_ptr(
&self, &self,
@ -1098,7 +1098,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
Ok(()) Ok(())
} }
/// Error if there are relocations overlapping with the egdes of the /// Error if there are relocations overlapping with the edges of the
/// given memory range. /// given memory range.
#[inline] #[inline]
fn check_relocation_edges(&self, ptr: Pointer<M::PointerTag>, size: Size) -> EvalResult<'tcx> { fn check_relocation_edges(&self, ptr: Pointer<M::PointerTag>, size: Size) -> EvalResult<'tcx> {

View file

@ -357,14 +357,14 @@ fn from_known_layout<'tcx>(
} }
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> { impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
/// Try reading a value in memory; this is interesting particularily for ScalarPair. /// Try reading a value in memory; this is interesting particularly for ScalarPair.
/// Return None if the layout does not permit loading this as a value. /// Return None if the layout does not permit loading this as a value.
pub(super) fn try_read_value_from_mplace( pub(super) fn try_read_value_from_mplace(
&self, &self,
mplace: MPlaceTy<'tcx, M::PointerTag>, mplace: MPlaceTy<'tcx, M::PointerTag>,
) -> EvalResult<'tcx, Option<Value<M::PointerTag>>> { ) -> EvalResult<'tcx, Option<Value<M::PointerTag>>> {
if mplace.layout.is_unsized() { if mplace.layout.is_unsized() {
// Dont touch unsized // Don't touch unsized
return Ok(None); return Ok(None);
} }
let (ptr, ptr_align) = mplace.to_scalar_ptr_align(); let (ptr, ptr_align) = mplace.to_scalar_ptr_align();

View file

@ -230,7 +230,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
), ),
} }
} }
// non-ZST also have to be dereferencable // non-ZST also have to be dereferenceable
if size != Size::ZERO { if size != Size::ZERO {
let ptr = try_validation!(place.ptr.to_ptr(), let ptr = try_validation!(place.ptr.to_ptr(),
"integer pointer in non-ZST reference", path); "integer pointer in non-ZST reference", path);
@ -272,7 +272,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
// FIXME: Check if the signature matches // FIXME: Check if the signature matches
} }
// This should be all the primitive types // This should be all the primitive types
ty::Never => bug!("Uninhabited type should have been catched earlier"), ty::Never => bug!("Uninhabited type should have been caught earlier"),
_ => bug!("Unexpected primitive type {}", value.layout.ty) _ => bug!("Unexpected primitive type {}", value.layout.ty)
} }
Ok(()) Ok(())

View file

@ -166,12 +166,12 @@ impl<'a> AstValidator<'a> {
} }
} }
/// With eRFC 2497, we need to check whether an expression is ambigious and warn or error /// With eRFC 2497, we need to check whether an expression is ambiguous and warn or error
/// depending on the edition, this function handles that. /// depending on the edition, this function handles that.
fn while_if_let_ambiguity(&self, expr: &P<Expr>) { fn while_if_let_ambiguity(&self, expr: &P<Expr>) {
if let Some((span, op_kind)) = self.while_if_let_expr_ambiguity(&expr) { if let Some((span, op_kind)) = self.while_if_let_expr_ambiguity(&expr) {
let mut err = self.err_handler().struct_span_err( let mut err = self.err_handler().struct_span_err(
span, &format!("ambigious use of `{}`", op_kind.to_string()) span, &format!("ambiguous use of `{}`", op_kind.to_string())
); );
err.note( err.note(
@ -193,9 +193,9 @@ impl<'a> AstValidator<'a> {
} }
/// With eRFC 2497 adding if-let chains, there is a requirement that the parsing of /// With eRFC 2497 adding if-let chains, there is a requirement that the parsing of
/// `&&` and `||` in a if-let statement be unambigious. This function returns a span and /// `&&` and `||` in a if-let statement be unambiguous. This function returns a span and
/// a `BinOpKind` (either `&&` or `||` depending on what was ambigious) if it is determined /// a `BinOpKind` (either `&&` or `||` depending on what was ambiguous) if it is determined
/// that the current expression parsed is ambigious and will break in future. /// that the current expression parsed is ambiguous and will break in future.
fn while_if_let_expr_ambiguity(&self, expr: &P<Expr>) -> Option<(Span, BinOpKind)> { fn while_if_let_expr_ambiguity(&self, expr: &P<Expr>) -> Option<(Span, BinOpKind)> {
debug!("while_if_let_expr_ambiguity: expr.node: {:?}", expr.node); debug!("while_if_let_expr_ambiguity: expr.node: {:?}", expr.node);
match &expr.node { match &expr.node {
@ -203,12 +203,12 @@ impl<'a> AstValidator<'a> {
Some((expr.span, op.node)) Some((expr.span, op.node))
}, },
ExprKind::Range(ref lhs, ref rhs, _) => { ExprKind::Range(ref lhs, ref rhs, _) => {
let lhs_ambigious = lhs.as_ref() let lhs_ambiguous = lhs.as_ref()
.and_then(|lhs| self.while_if_let_expr_ambiguity(lhs)); .and_then(|lhs| self.while_if_let_expr_ambiguity(lhs));
let rhs_ambigious = rhs.as_ref() let rhs_ambiguous = rhs.as_ref()
.and_then(|rhs| self.while_if_let_expr_ambiguity(rhs)); .and_then(|rhs| self.while_if_let_expr_ambiguity(rhs));
lhs_ambigious.or(rhs_ambigious) lhs_ambiguous.or(rhs_ambiguous)
} }
_ => None, _ => None,
} }

View file

@ -430,7 +430,7 @@ impl Align {
} }
/// Lower the alignment, if necessary, such that the given offset /// Lower the alignment, if necessary, such that the given offset
/// is aligned to it (the offset is a multiple of the aligment). /// is aligned to it (the offset is a multiple of the alignment).
pub fn restrict_for_offset(self, offset: Size) -> Align { pub fn restrict_for_offset(self, offset: Size) -> Align {
self.min(Align::max_for_offset(offset)) self.min(Align::max_for_offset(offset))
} }

View file

@ -5198,7 +5198,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
} else { } else {
// If no type arguments were provided, we have to infer them. // If no type arguments were provided, we have to infer them.
// This case also occurs as a result of some malformed input, e.g. // This case also occurs as a result of some malformed input, e.g.
// a lifetime argument being given instead of a type paramter. // a lifetime argument being given instead of a type parameter.
// Using inference instead of `Error` gives better error messages. // Using inference instead of `Error` gives better error messages.
self.var_for_def(span, param) self.var_for_def(span, param)
} }

View file

@ -674,7 +674,7 @@ fn check_existential_types<'a, 'fcx, 'gcx, 'tcx>(
} // if may_define_existential_type } // if may_define_existential_type
// now register the bounds on the parameters of the existential type // now register the bounds on the parameters of the existential type
// so the parameters given by the function need to fulfil them // so the parameters given by the function need to fulfill them
// ```rust // ```rust
// existential type Foo<T: Bar>: 'static; // existential type Foo<T: Bar>: 'static;
// fn foo<U>() -> Foo<U> { .. *} // fn foo<U>() -> Foo<U> { .. *}

View file

@ -269,7 +269,7 @@ pub fn coerce_unsized_info<'a, 'gcx>(gcx: TyCtxt<'a, 'gcx, 'gcx>,
// exactly one (non-phantom) field has changed its // exactly one (non-phantom) field has changed its
// type, which we will expect to be the pointer that // type, which we will expect to be the pointer that
// is becoming fat (we could probably generalize this // is becoming fat (we could probably generalize this
// to mutiple thin pointers of the same type becoming // to multiple thin pointers of the same type becoming
// fat, but we don't). In this case: // fat, but we don't). In this case:
// //
// - `extra` has type `T` before and type `T` after // - `extra` has type `T` before and type `T` after

View file

@ -97,7 +97,7 @@
//! - A **multiprocessor** system executing multiple hardware threads //! - A **multiprocessor** system executing multiple hardware threads
//! at the same time: In multi-threaded scenarios, you can use two //! at the same time: In multi-threaded scenarios, you can use two
//! kinds of primitives to deal with synchronization: //! kinds of primitives to deal with synchronization:
//! - [memory fences] to ensure memory accesses are made visibile to //! - [memory fences] to ensure memory accesses are made visible to
//! other CPUs in the right order. //! other CPUs in the right order.
//! - [atomic operations] to ensure simultaneous access to the same //! - [atomic operations] to ensure simultaneous access to the same
//! memory location doesn't lead to undefined behavior. //! memory location doesn't lead to undefined behavior.

View file

@ -290,8 +290,8 @@ impl Once {
} }
/// Returns true if some `call_once` call has completed /// Returns true if some `call_once` call has completed
/// successfuly. Specifically, `is_completed` will return false in /// successfully. Specifically, `is_completed` will return false in
/// the following situtations: /// the following situations:
/// * `call_once` was not called at all, /// * `call_once` was not called at all,
/// * `call_once` was called, but has not yet completed, /// * `call_once` was called, but has not yet completed,
/// * the `Once` instance is poisoned /// * the `Once` instance is poisoned

View file

@ -96,7 +96,7 @@ impl<'a> StripUnconfigured<'a> {
/// when the configuration predicate is true, or otherwise expand into an /// when the configuration predicate is true, or otherwise expand into an
/// empty list of attributes. /// empty list of attributes.
/// ///
/// Gives a compiler warning when the `cfg_attr` contains no attribtes and /// Gives a compiler warning when the `cfg_attr` contains no attributes and
/// is in the original source file. Gives a compiler error if the syntax of /// is in the original source file. Gives a compiler error if the syntax of
/// the attribute is incorrect /// the attribute is incorrect
fn process_cfg_attr(&mut self, attr: ast::Attribute) -> Vec<ast::Attribute> { fn process_cfg_attr(&mut self, attr: ast::Attribute) -> Vec<ast::Attribute> {
@ -138,7 +138,7 @@ impl<'a> StripUnconfigured<'a> {
}; };
// Check feature gate and lint on zero attributes in source. Even if the feature is gated, // Check feature gate and lint on zero attributes in source. Even if the feature is gated,
// we still compute as if it wasn't, since the emitted error will stop compilation futher // we still compute as if it wasn't, since the emitted error will stop compilation further
// along the compilation. // along the compilation.
match (expanded_attrs.len(), gate_cfg_attr_multi) { match (expanded_attrs.len(), gate_cfg_attr_multi) {
(0, false) => { (0, false) => {

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
// run-pass // run-pass
// Test for issue #18804, #[linkage] does not propagate thorugh generic // Test for issue #18804, #[linkage] does not propagate through generic
// functions. Failure results in a linker error. // functions. Failure results in a linker error.
// ignore-asmjs no weak symbol support // ignore-asmjs no weak symbol support

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Test that we do some basic error correcton in the tokeniser (and don't spew // Test that we do some basic error correction in the tokeniser (and don't spew
// too many bogus errors). // too many bogus errors).
fn foo() -> usize { fn foo() -> usize {

View file

@ -1,5 +1,5 @@
// Test that cfg_attr doesn't emit any attributes when the // Test that cfg_attr doesn't emit any attributes when the
// configuation variable is false. This mirrors `cfg-attr-multi-true.rs` // configuration variable is false. This mirrors `cfg-attr-multi-true.rs`
// compile-pass // compile-pass

View file

@ -66,7 +66,7 @@ impl<F> R<F> { fn new(f: F) -> Self { R { w: 0, f } } }
// It got pretty monotonous writing the same code over and over, and I // It got pretty monotonous writing the same code over and over, and I
// feared I would forget details. So I abstracted some desiderata into // feared I would forget details. So I abstracted some desiderata into
// macros. But I left the initialization code inline, because that's // macros. But I left the initialization code inline, because that's
// where the errors for #54986 will be emited. // where the errors for #54986 will be emitted.
macro_rules! use_fully { macro_rules! use_fully {
(struct $s:expr) => { { (struct $s:expr) => { {

View file

@ -1,5 +1,5 @@
// rust-lang/rust#52059: Regardless of whether you are moving out of a // rust-lang/rust#52059: Regardless of whether you are moving out of a
// Drop type or just introducing an inadvertant alias via a borrow of // Drop type or just introducing an inadvertent alias via a borrow of
// one of its fields, it is useful to be reminded of the significance // one of its fields, it is useful to be reminded of the significance
// of the fact that the type implements Drop. // of the fact that the type implements Drop.

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Test that we do some basic error correcton in the tokeniser (and don't ICE). // Test that we do some basic error correction in the tokeniser (and don't ICE).
fn main() { fn main() {
if foo { if foo {

View file

@ -10,7 +10,7 @@
// ignore-cloudabi no std::fs support // ignore-cloudabi no std::fs support
// Test that we do some basic error correcton in the tokeniser (and don't spew // Test that we do some basic error correction in the tokeniser (and don't spew
// too many bogus errors). // too many bogus errors).
pub mod raw { pub mod raw {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Test that we do some basic error correcton in the tokeniser. // Test that we do some basic error correction in the tokeniser.
fn main() { fn main() {
foo(bar(; foo(bar(;

View file

@ -19,22 +19,22 @@ fn main() {
use std::ops::Range; use std::ops::Range;
if let Range { start: _, end: _ } = true..true && false { } if let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
if let Range { start: _, end: _ } = true..true || false { } if let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||` //~^ ERROR ambiguous use of `||`
while let Range { start: _, end: _ } = true..true && false { } while let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
while let Range { start: _, end: _ } = true..true || false { } while let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||` //~^ ERROR ambiguous use of `||`
if let true = false && false { } if let true = false && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
while let true = (1 == 2) && false { } while let true = (1 == 2) && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
// The following cases are not an error as parenthesis are used to // The following cases are not an error as parenthesis are used to
// clarify intent: // clarify intent:

View file

@ -1,4 +1,4 @@
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:21:47 --> $DIR/syntax-ambiguity-2015.rs:21:47
| |
LL | if let Range { start: _, end: _ } = true..true && false { } LL | if let Range { start: _, end: _ } = true..true && false { }
@ -7,7 +7,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `||` error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:24:47 --> $DIR/syntax-ambiguity-2015.rs:24:47
| |
LL | if let Range { start: _, end: _ } = true..true || false { } LL | if let Range { start: _, end: _ } = true..true || false { }
@ -16,7 +16,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:27:50 --> $DIR/syntax-ambiguity-2015.rs:27:50
| |
LL | while let Range { start: _, end: _ } = true..true && false { } LL | while let Range { start: _, end: _ } = true..true && false { }
@ -25,7 +25,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `||` error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:30:50 --> $DIR/syntax-ambiguity-2015.rs:30:50
| |
LL | while let Range { start: _, end: _ } = true..true || false { } LL | while let Range { start: _, end: _ } = true..true || false { }
@ -34,7 +34,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:33:19 --> $DIR/syntax-ambiguity-2015.rs:33:19
| |
LL | if let true = false && false { } LL | if let true = false && false { }
@ -43,7 +43,7 @@ LL | if let true = false && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:36:22 --> $DIR/syntax-ambiguity-2015.rs:36:22
| |
LL | while let true = (1 == 2) && false { } LL | while let true = (1 == 2) && false { }

View file

@ -19,22 +19,22 @@ fn main() {
use std::ops::Range; use std::ops::Range;
if let Range { start: _, end: _ } = true..true && false { } if let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
if let Range { start: _, end: _ } = true..true || false { } if let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||` //~^ ERROR ambiguous use of `||`
while let Range { start: _, end: _ } = true..true && false { } while let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
while let Range { start: _, end: _ } = true..true || false { } while let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||` //~^ ERROR ambiguous use of `||`
if let true = false && false { } if let true = false && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
while let true = (1 == 2) && false { } while let true = (1 == 2) && false { }
//~^ ERROR ambigious use of `&&` //~^ ERROR ambiguous use of `&&`
// The following cases are not an error as parenthesis are used to // The following cases are not an error as parenthesis are used to
// clarify intent: // clarify intent:

View file

@ -1,4 +1,4 @@
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:21:47 --> $DIR/syntax-ambiguity-2018.rs:21:47
| |
LL | if let Range { start: _, end: _ } = true..true && false { } LL | if let Range { start: _, end: _ } = true..true && false { }
@ -7,7 +7,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `||` error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:24:47 --> $DIR/syntax-ambiguity-2018.rs:24:47
| |
LL | if let Range { start: _, end: _ } = true..true || false { } LL | if let Range { start: _, end: _ } = true..true || false { }
@ -16,7 +16,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:27:50 --> $DIR/syntax-ambiguity-2018.rs:27:50
| |
LL | while let Range { start: _, end: _ } = true..true && false { } LL | while let Range { start: _, end: _ } = true..true && false { }
@ -25,7 +25,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `||` error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:30:50 --> $DIR/syntax-ambiguity-2018.rs:30:50
| |
LL | while let Range { start: _, end: _ } = true..true || false { } LL | while let Range { start: _, end: _ } = true..true || false { }
@ -34,7 +34,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:33:19 --> $DIR/syntax-ambiguity-2018.rs:33:19
| |
LL | if let true = false && false { } LL | if let true = false && false { }
@ -43,7 +43,7 @@ LL | if let true = false && false { }
= note: this will be a error until the `let_chains` feature is stabilized = note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information = note: see rust-lang/rust#53668 for more information
error: ambigious use of `&&` error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:36:22 --> $DIR/syntax-ambiguity-2018.rs:36:22
| |
LL | while let true = (1 == 2) && false { } LL | while let true = (1 == 2) && false { }

View file

@ -24,7 +24,7 @@ use std::fmt::{Debug, Display};
// • one generic parameter (T) bound inline // • one generic parameter (T) bound inline
// • one parameter (T) with a where clause // • one parameter (T) with a where clause
// • two parameters (T and U), both bound inline // • two parameters (T and U), both bound inline
// • two paramters (T and U), one bound inline, one with a where clause // • two parameters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses // • two parameters (T and U), both with where clauses
// //
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1 // —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1

View file

@ -24,7 +24,7 @@ use std::fmt::{Debug, Display};
// • one generic parameter (T) bound inline // • one generic parameter (T) bound inline
// • one parameter (T) with a where clause // • one parameter (T) with a where clause
// • two parameters (T and U), both bound inline // • two parameters (T and U), both bound inline
// • two paramters (T and U), one bound inline, one with a where clause // • two parameters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses // • two parameters (T and U), both with where clauses
// //
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1 // —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1

View file

@ -12,7 +12,7 @@
// Regression test for #52050: when inserting the blanket impl `I` // Regression test for #52050: when inserting the blanket impl `I`
// into the tree, we had to replace the child node for `Foo`, which // into the tree, we had to replace the child node for `Foo`, which
// led to the struture of the tree being messed up. // led to the structure of the tree being messed up.
use std::iter::Iterator; use std::iter::Iterator;

View file

@ -163,7 +163,7 @@ fn check_cfgs(contents: &mut String, file: &Path,
fn find_test_mod(contents: &str) -> usize { fn find_test_mod(contents: &str) -> usize {
if let Some(mod_tests_idx) = contents.find("mod tests") { if let Some(mod_tests_idx) = contents.find("mod tests") {
// Also capture a previos line indicating "mod tests" in cfg-ed out // Also capture a previous line indicating "mod tests" in cfg-ed out
let prev_newline_idx = contents[..mod_tests_idx].rfind('\n').unwrap_or(mod_tests_idx); let prev_newline_idx = contents[..mod_tests_idx].rfind('\n').unwrap_or(mod_tests_idx);
let prev_newline_idx = contents[..prev_newline_idx].rfind('\n'); let prev_newline_idx = contents[..prev_newline_idx].rfind('\n');
if let Some(nl) = prev_newline_idx { if let Some(nl) = prev_newline_idx {