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 ''
def bootstrap_binary(self):
"""Return the path of the boostrap binary
"""Return the path of the bootstrap binary
>>> rb = RustBuild()
>>> 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):
"""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."""
data_ptr_type = data_ptr_val.type

View File

@ -77,7 +77,7 @@ use self::Entry::*;
/// movie_reviews.insert("Office Space", "Deals with real issues in the workplace.");
/// movie_reviews.insert("Pulp Fiction", "Masterpiece.");
/// movie_reviews.insert("The Godfather", "Very enjoyable.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it alot.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it a lot.");
///
/// // check for a specific one.
/// if !movie_reviews.contains_key("Les Misérables") {

View File

@ -518,7 +518,7 @@ pub unsafe trait GlobalAlloc {
/// The block is described by the given `ptr` pointer and `layout`.
///
/// 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,
/// and should be considered unusable (unless of course it was
/// 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.
/// 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
/// // memory.
/// 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
/// 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
/// [`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
//! 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
//! 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

View File

@ -40,7 +40,7 @@ impl ::std::fmt::Debug for CrateNum {
match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
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"),
}
}
@ -101,7 +101,7 @@ impl fmt::Display for CrateNum {
match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
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"),
}
}

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 {

View File

@ -469,7 +469,7 @@ pub enum BorrowKind {
/// }
///
/// 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`.
/// We can also report errors with this kind of borrow differently.
Shallow,

View File

@ -412,7 +412,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
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() {
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);
Some(self.call(v, inputs, None))
} else {
// LLVM has detected an issue with our constaints, bail out
// LLVM has detected an issue with our constraints, bail out
None
}
}

View File

@ -68,7 +68,7 @@ macro_rules! provide {
let $cdata = $tcx.crate_data_as_rc_any($def_id.krate);
let $cdata = $cdata.downcast_ref::<cstore::CrateMetadata>()
.expect("CrateStore crated ata is not a CrateMetadata");
.expect("CrateStore created data is not a CrateMetadata");
$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());
let mut alloc = alloc.clone();
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?
let alloc = ecx.tcx.intern_const_alloc(alloc);
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`.
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
lifetime, which would again violate the `&mut`-borrow's exclusive
access.

View File

@ -556,7 +556,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
)?;
}
} 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);
}

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.
impl<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>>
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.
/// 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]
fn get_bytes_with_undef_and_ptr(
&self,
@ -1098,7 +1098,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
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.
#[inline]
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> {
/// 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.
pub(super) fn try_read_value_from_mplace(
&self,
mplace: MPlaceTy<'tcx, M::PointerTag>,
) -> EvalResult<'tcx, Option<Value<M::PointerTag>>> {
if mplace.layout.is_unsized() {
// Dont touch unsized
// Don't touch unsized
return Ok(None);
}
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 {
let ptr = try_validation!(place.ptr.to_ptr(),
"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
}
// 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)
}
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.
fn while_if_let_ambiguity(&self, expr: &P<Expr>) {
if let Some((span, op_kind)) = self.while_if_let_expr_ambiguity(&expr) {
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(
@ -193,9 +193,9 @@ impl<'a> AstValidator<'a> {
}
/// 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
/// a `BinOpKind` (either `&&` or `||` depending on what was ambigious) if it is determined
/// that the current expression parsed is ambigious and will break in future.
/// `&&` and `||` in a if-let statement be unambiguous. This function returns a span and
/// a `BinOpKind` (either `&&` or `||` depending on what was ambiguous) if it is determined
/// 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)> {
debug!("while_if_let_expr_ambiguity: expr.node: {:?}", expr.node);
match &expr.node {
@ -203,12 +203,12 @@ impl<'a> AstValidator<'a> {
Some((expr.span, op.node))
},
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));
let rhs_ambigious = rhs.as_ref()
let rhs_ambiguous = rhs.as_ref()
.and_then(|rhs| self.while_if_let_expr_ambiguity(rhs));
lhs_ambigious.or(rhs_ambigious)
lhs_ambiguous.or(rhs_ambiguous)
}
_ => None,
}

View File

@ -430,7 +430,7 @@ impl Align {
}
/// 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 {
self.min(Align::max_for_offset(offset))
}

View File

@ -5198,7 +5198,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
} else {
// If no type arguments were provided, we have to infer them.
// 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.
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
// 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
// existential type Foo<T: Bar>: 'static;
// 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
// type, which we will expect to be the pointer that
// 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:
//
// - `extra` has type `T` before and type `T` after

View File

@ -97,7 +97,7 @@
//! - A **multiprocessor** system executing multiple hardware threads
//! at the same time: In multi-threaded scenarios, you can use two
//! 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.
//! - [atomic operations] to ensure simultaneous access to the same
//! 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
/// successfuly. Specifically, `is_completed` will return false in
/// the following situtations:
/// successfully. Specifically, `is_completed` will return false in
/// the following situations:
/// * `call_once` was not called at all,
/// * `call_once` was called, but has not yet completed,
/// * 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
/// 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
/// the attribute is incorrect
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,
// 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.
match (expanded_attrs.len(), gate_cfg_attr_multi) {
(0, false) => {

View File

@ -9,7 +9,7 @@
// except according to those terms.
// 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.
// ignore-asmjs no weak symbol support

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// 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).
fn foo() -> usize {

View File

@ -1,5 +1,5 @@
// 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

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
// feared I would forget details. So I abstracted some desiderata into
// 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 {
(struct $s:expr) => { {

View File

@ -1,5 +1,5 @@
// 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
// of the fact that the type implements Drop.

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// 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() {
if foo {

View File

@ -10,7 +10,7 @@
// 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).
pub mod raw {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// 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() {
foo(bar(;

View File

@ -19,22 +19,22 @@ fn main() {
use std::ops::Range;
if let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
if let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||`
//~^ ERROR ambiguous use of `||`
while let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
while let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||`
//~^ ERROR ambiguous use of `||`
if let true = false && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
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
// clarify intent:

View File

@ -1,4 +1,4 @@
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:21:47
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `||`
error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:24:47
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:27:50
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `||`
error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:30:50
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:33:19
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:36:22
|
LL | while let true = (1 == 2) && false { }

View File

@ -19,22 +19,22 @@ fn main() {
use std::ops::Range;
if let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
if let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||`
//~^ ERROR ambiguous use of `||`
while let Range { start: _, end: _ } = true..true && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
while let Range { start: _, end: _ } = true..true || false { }
//~^ ERROR ambigious use of `||`
//~^ ERROR ambiguous use of `||`
if let true = false && false { }
//~^ ERROR ambigious use of `&&`
//~^ ERROR ambiguous use of `&&`
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
// clarify intent:

View File

@ -1,4 +1,4 @@
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:21:47
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `||`
error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:24:47
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:27:50
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `||`
error: ambiguous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:30:50
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:33:19
|
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: see rust-lang/rust#53668 for more information
error: ambigious use of `&&`
error: ambiguous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:36:22
|
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 parameter (T) with a where clause
// • 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
//
// —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 parameter (T) with a where clause
// • 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
//
// —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`
// 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;

View File

@ -163,7 +163,7 @@ fn check_cfgs(contents: &mut String, file: &Path,
fn find_test_mod(contents: &str) -> usize {
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[..prev_newline_idx].rfind('\n');
if let Some(nl) = prev_newline_idx {