mirror of
https://github.com/rust-lang/rust
synced 2024-10-17 14:03:42 +00:00
fix dupe word typos
This commit is contained in:
parent
b9341bfdb1
commit
58110572fb
|
@ -240,7 +240,7 @@ fn align_offset(
|
||||||
let align = ImmTy::from_uint(target_align, args[1].layout).into();
|
let align = ImmTy::from_uint(target_align, args[1].layout).into();
|
||||||
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?;
|
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?;
|
||||||
|
|
||||||
// We replace the entire entire function call with a "tail call".
|
// We replace the entire function call with a "tail call".
|
||||||
// Note that this happens before the frame of the original function
|
// Note that this happens before the frame of the original function
|
||||||
// is pushed on the stack.
|
// is pushed on the stack.
|
||||||
self.eval_fn_call(
|
self.eval_fn_call(
|
||||||
|
|
|
@ -406,7 +406,7 @@ fn clone_from(&mut self, source: &Self) {
|
||||||
/// The dataflow state for an instance of [`ValueAnalysis`].
|
/// The dataflow state for an instance of [`ValueAnalysis`].
|
||||||
///
|
///
|
||||||
/// Every instance specifies a lattice that represents the possible values of a single tracked
|
/// Every instance specifies a lattice that represents the possible values of a single tracked
|
||||||
/// place. If we call this lattice `V` and set set of tracked places `P`, then a [`State`] is an
|
/// place. If we call this lattice `V` and set of tracked places `P`, then a [`State`] is an
|
||||||
/// element of `{unreachable} ∪ (P -> V)`. This again forms a lattice, where the bottom element is
|
/// element of `{unreachable} ∪ (P -> V)`. This again forms a lattice, where the bottom element is
|
||||||
/// `unreachable` and the top element is the mapping `p ↦ ⊤`. Note that the mapping `p ↦ ⊥` is not
|
/// `unreachable` and the top element is the mapping `p ↦ ⊤`. Note that the mapping `p ↦ ⊥` is not
|
||||||
/// the bottom element (because joining an unreachable and any other reachable state yields a
|
/// the bottom element (because joining an unreachable and any other reachable state yields a
|
||||||
|
|
|
@ -1927,7 +1927,7 @@ enum Elision {
|
||||||
// We have a single lifetime => success.
|
// We have a single lifetime => success.
|
||||||
elision_lifetime = Elision::Param(res)
|
elision_lifetime = Elision::Param(res)
|
||||||
} else {
|
} else {
|
||||||
// We have have multiple lifetimes => error.
|
// We have multiple lifetimes => error.
|
||||||
elision_lifetime = Elision::Err;
|
elision_lifetime = Elision::Err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
/// #![feature(iter_repeat_n)]
|
/// #![feature(iter_repeat_n)]
|
||||||
/// use std::iter;
|
/// use std::iter;
|
||||||
///
|
///
|
||||||
/// // four of the the number four:
|
/// // four of the number four:
|
||||||
/// let mut four_fours = iter::repeat_n(4, 4);
|
/// let mut four_fours = iter::repeat_n(4, 4);
|
||||||
///
|
///
|
||||||
/// assert_eq!(Some(4), four_fours.next());
|
/// assert_eq!(Some(4), four_fours.next());
|
||||||
|
|
|
@ -1894,7 +1894,7 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
|
||||||
// Thus, derefencing both `px` and `py` in the loop below is safe.
|
// Thus, derefencing both `px` and `py` in the loop below is safe.
|
||||||
//
|
//
|
||||||
// Moreover, we set `pxend` and `pyend` to be 4 bytes before the actual
|
// Moreover, we set `pxend` and `pyend` to be 4 bytes before the actual
|
||||||
// end of of `px` and `py`. Thus, the final dereference outside of the
|
// end of `px` and `py`. Thus, the final dereference outside of the
|
||||||
// loop is guaranteed to be valid. (The final comparison will overlap with
|
// loop is guaranteed to be valid. (The final comparison will overlap with
|
||||||
// the last comparison done in the loop for lengths that aren't multiples
|
// the last comparison done in the loop for lengths that aren't multiples
|
||||||
// of four.)
|
// of four.)
|
||||||
|
|
|
@ -225,7 +225,7 @@ fn start_recv(&self, token: &mut Token) -> bool {
|
||||||
let slot = unsafe { self.buffer.get_unchecked(index) };
|
let slot = unsafe { self.buffer.get_unchecked(index) };
|
||||||
let stamp = slot.stamp.load(Ordering::Acquire);
|
let stamp = slot.stamp.load(Ordering::Acquire);
|
||||||
|
|
||||||
// If the the stamp is ahead of the head by 1, we may attempt to pop.
|
// If the stamp is ahead of the head by 1, we may attempt to pop.
|
||||||
if head + 1 == stamp {
|
if head + 1 == stamp {
|
||||||
let new = if index + 1 < self.cap {
|
let new = if index + 1 < self.cap {
|
||||||
// Same lap, incremented index.
|
// Same lap, incremented index.
|
||||||
|
|
|
@ -46,7 +46,7 @@ pub(super) fn increment_num_running_threads(&self) {
|
||||||
// We check for 'overflow' with usize::MAX / 2, to make sure there's no
|
// We check for 'overflow' with usize::MAX / 2, to make sure there's no
|
||||||
// chance it overflows to 0, which would result in unsoundness.
|
// chance it overflows to 0, which would result in unsoundness.
|
||||||
if self.num_running_threads.fetch_add(1, Ordering::Relaxed) > usize::MAX / 2 {
|
if self.num_running_threads.fetch_add(1, Ordering::Relaxed) > usize::MAX / 2 {
|
||||||
// This can only reasonably happen by mem::forget()'ing many many ScopedJoinHandles.
|
// This can only reasonably happen by mem::forget()'ing a lot of ScopedJoinHandles.
|
||||||
self.decrement_num_running_threads(false);
|
self.decrement_num_running_threads(false);
|
||||||
panic!("too many running threads in thread scope");
|
panic!("too many running threads in thread scope");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ struct Foo {
|
||||||
|
|
||||||
impl PartialEq for Foo {
|
impl PartialEq for Foo {
|
||||||
fn eq(&self, _: &Foo) -> bool {
|
fn eq(&self, _: &Foo) -> bool {
|
||||||
false // ha ha sucker!
|
false // ha ha!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue