Skip to content

Commit 7696248

Browse files
authored
Rollup merge of #109180 - gimbles:master, r=compiler-errors
Unequal → Not equal Fixes #109168
2 parents 113e815 + e5a5b90 commit 7696248

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

compiler/rustc_borrowck/src/dataflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
306306
}
307307

308308
// By passing `PlaceConflictBias::NoOverlap`, we conservatively assume that any given
309-
// pair of array indices are unequal, so that when `places_conflict` returns true, we
309+
// pair of array indices are not equal, so that when `places_conflict` returns true, we
310310
// will be assured that two places being compared definitely denotes the same sets of
311311
// locations.
312312
let definitely_conflicting_borrows = other_borrows_of_local.filter(|&i| {

compiler/rustc_error_codes/src/error_codes/E0416.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ Or maybe did you mean to unify? Consider using a guard:
2323
# let (A, B, C) = (1, 2, 3);
2424
match (A, B, C) {
2525
(x, x2, see) if x == x2 => { /* A and B are equal, do one thing */ }
26-
(y, z, see) => { /* A and B unequal; do another thing */ }
26+
(y, z, see) => { /* A and B not equal; do another thing */ }
2727
}
2828
```

compiler/rustc_expand/src/mbe/transcribe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl LockstepIterSize {
367367
///
368368
/// Example: `$($($x $y)+*);+` -- we need to make sure that `x` and `y` repeat the same amount as
369369
/// each other at the given depth when the macro was invoked. If they don't it might mean they were
370-
/// declared at unequal depths or there was a compile bug. For example, if we have 3 repetitions of
370+
/// declared at depths which weren't equal or there was a compiler bug. For example, if we have 3 repetitions of
371371
/// the outer sequence and 4 repetitions of the inner sequence for `x`, we should have the same for
372372
/// `y`; otherwise, we can't transcribe them both at the given depth.
373373
fn lockstep_iter_size(

compiler/rustc_middle/src/mir/syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ pub enum Rvalue<'tcx> {
10811081
/// Same as `BinaryOp`, but yields `(T, bool)` with a `bool` indicating an error condition.
10821082
///
10831083
/// For addition, subtraction, and multiplication on integers the error condition is set when
1084-
/// the infinite precision result would be unequal to the actual result.
1084+
/// the infinite precision result would not be equal to the actual result.
10851085
///
10861086
/// Other combinations of types and operators are unsupported.
10871087
CheckedBinaryOp(BinOp, Box<(Operand<'tcx>, Operand<'tcx>)>),

compiler/rustc_middle/src/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ rustc_queries! {
22152215
}
22162216

22172217
/// Used in `super_combine_consts` to ICE if the type of the two consts are definitely not going to end up being
2218-
/// equal to eachother. This might return `Ok` even if the types are unequal, but will never return `Err` if
2218+
/// equal to eachother. This might return `Ok` even if the types are not equal, but will never return `Err` if
22192219
/// the types might be equal.
22202220
query check_tys_might_be_eq(arg: Canonical<'tcx, (ty::ParamEnv<'tcx>, Ty<'tcx>, Ty<'tcx>)>) -> Result<(), NoSolution> {
22212221
desc { "check whether two const param are definitely not equal to eachother"}

compiler/rustc_middle/src/ty/consts/int.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl ScalarInt {
237237
}
238238

239239
/// Tries to convert the `ScalarInt` to an unsigned integer of the given size.
240-
/// Fails if the size of the `ScalarInt` is unequal to `size` and returns the
240+
/// Fails if the size of the `ScalarInt` is not equal to `size` and returns the
241241
/// `ScalarInt`s size in that case.
242242
#[inline]
243243
pub fn try_to_uint(self, size: Size) -> Result<u128, Size> {
@@ -297,7 +297,7 @@ impl ScalarInt {
297297
}
298298

299299
/// Tries to convert the `ScalarInt` to a signed integer of the given size.
300-
/// Fails if the size of the `ScalarInt` is unequal to `size` and returns the
300+
/// Fails if the size of the `ScalarInt` is not equal to `size` and returns the
301301
/// `ScalarInt`s size in that case.
302302
#[inline]
303303
pub fn try_to_int(self, size: Size) -> Result<i128, Size> {
@@ -306,35 +306,35 @@ impl ScalarInt {
306306
}
307307

308308
/// Tries to convert the `ScalarInt` to i8.
309-
/// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 1 }`
309+
/// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 1 }`
310310
/// and returns the `ScalarInt`s size in that case.
311311
pub fn try_to_i8(self) -> Result<i8, Size> {
312312
self.try_to_int(Size::from_bits(8)).map(|v| i8::try_from(v).unwrap())
313313
}
314314

315315
/// Tries to convert the `ScalarInt` to i16.
316-
/// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 2 }`
316+
/// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 2 }`
317317
/// and returns the `ScalarInt`s size in that case.
318318
pub fn try_to_i16(self) -> Result<i16, Size> {
319319
self.try_to_int(Size::from_bits(16)).map(|v| i16::try_from(v).unwrap())
320320
}
321321

322322
/// Tries to convert the `ScalarInt` to i32.
323-
/// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 4 }`
323+
/// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 4 }`
324324
/// and returns the `ScalarInt`s size in that case.
325325
pub fn try_to_i32(self) -> Result<i32, Size> {
326326
self.try_to_int(Size::from_bits(32)).map(|v| i32::try_from(v).unwrap())
327327
}
328328

329329
/// Tries to convert the `ScalarInt` to i64.
330-
/// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 8 }`
330+
/// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 8 }`
331331
/// and returns the `ScalarInt`s size in that case.
332332
pub fn try_to_i64(self) -> Result<i64, Size> {
333333
self.try_to_int(Size::from_bits(64)).map(|v| i64::try_from(v).unwrap())
334334
}
335335

336336
/// Tries to convert the `ScalarInt` to i128.
337-
/// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 16 }`
337+
/// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 16 }`
338338
/// and returns the `ScalarInt`s size in that case.
339339
pub fn try_to_i128(self) -> Result<i128, Size> {
340340
self.try_to_int(Size::from_bits(128)).map(|v| i128::try_from(v).unwrap())

library/alloc/src/rc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1738,11 +1738,11 @@ impl<T: ?Sized + PartialEq> PartialEq for Rc<T> {
17381738

17391739
/// Inequality for two `Rc`s.
17401740
///
1741-
/// Two `Rc`s are unequal if their inner values are unequal.
1741+
/// Two `Rc`s are not equal if their inner values are not equal.
17421742
///
17431743
/// If `T` also implements `Eq` (implying reflexivity of equality),
17441744
/// two `Rc`s that point to the same allocation are
1745-
/// never unequal.
1745+
/// always equal.
17461746
///
17471747
/// # Examples
17481748
///

library/alloc/src/sync.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2475,10 +2475,10 @@ impl<T: ?Sized + PartialEq> PartialEq for Arc<T> {
24752475

24762476
/// Inequality for two `Arc`s.
24772477
///
2478-
/// Two `Arc`s are unequal if their inner values are unequal.
2478+
/// Two `Arc`s are not equal if their inner values are not equal.
24792479
///
24802480
/// If `T` also implements `Eq` (implying reflexivity of equality),
2481-
/// two `Arc`s that point to the same value are never unequal.
2481+
/// two `Arc`s that point to the same value are always equal.
24822482
///
24832483
/// # Examples
24842484
///

library/core/src/hash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod sip;
158158
///
159159
/// Implementations of `hash` should ensure that the data they
160160
/// pass to the `Hasher` are prefix-free. That is,
161-
/// unequal values should cause two different sequences of values to be written,
161+
/// values which are not equal should cause two different sequences of values to be written,
162162
/// and neither of the two sequences should be a prefix of the other.
163163
///
164164
/// For example, the standard implementation of [`Hash` for `&str`][impl] passes an extra

library/core/src/iter/traits/iterator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3721,7 +3721,7 @@ pub trait Iterator {
37213721
}
37223722
}
37233723

3724-
/// Determines if the elements of this [`Iterator`] are unequal to those of
3724+
/// Determines if the elements of this [`Iterator`] are not equal to those of
37253725
/// another.
37263726
///
37273727
/// # Examples

library/core/src/primitive_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ impl<T: Copy> Copy for (T,) {
11101110
/// - [NaN (not a number)](#associatedconstant.NAN): this value results from
11111111
/// calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected
11121112
/// behavior:
1113-
/// - It is unequal to any float, including itself! This is the reason `f32`
1113+
/// - It is not equal to any float, including itself! This is the reason `f32`
11141114
/// doesn't implement the `Eq` trait.
11151115
/// - It is also neither smaller nor greater than any float, making it
11161116
/// impossible to sort by the default comparison operation, which is the

library/std/src/primitive_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ impl<T: Copy> Copy for (T,) {
11101110
/// - [NaN (not a number)](#associatedconstant.NAN): this value results from
11111111
/// calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected
11121112
/// behavior:
1113-
/// - It is unequal to any float, including itself! This is the reason `f32`
1113+
/// - It is not equal to any float, including itself! This is the reason `f32`
11141114
/// doesn't implement the `Eq` trait.
11151115
/// - It is also neither smaller nor greater than any float, making it
11161116
/// impossible to sort by the default comparison operation, which is the

library/std/src/sync/remutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::sys::locks as sys;
3535
/// `owner` can be checked by other threads that want to see if they already
3636
/// hold the lock, so needs to be atomic. If it compares equal, we're on the
3737
/// same thread that holds the mutex and memory access can use relaxed ordering
38-
/// since we're not dealing with multiple threads. If it compares unequal,
38+
/// since we're not dealing with multiple threads. If it's not equal,
3939
/// synchronization is left to the mutex, making relaxed memory ordering for
4040
/// the `owner` field fine in all cases.
4141
pub struct ReentrantMutex<T> {

0 commit comments

Comments
 (0)