Lines Matching defs:other
3358 fn eq(&self, other: &TestPEq) -> bool {
3360 *other.0.borrow_mut() += 1;
3375 fn eq(&self, other: &TestEq) -> bool {
3377 *other.0.borrow_mut() += 1;
8721 fn eq(&self, other: &Foo) -> bool {
8722 self.0 == other.0
8762 fn eq(&self, other: &Self) -> bool {
8763 self.value == other.value
9115 fn eq(&self, other: &TestPEq) -> bool {
9117 *other.0.borrow_mut() += 1;
9132 fn eq(&self, other: &TestEq) -> bool {
9134 *other.0.borrow_mut() += 1;
10892 fn eq(&self, other: &Self) -> bool {
10893 self.partial_cmp(other) == Some(Ordering::Equal)
10898 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
10900 other.version.set(other.version.get() + 1);
10902 self.x.partial_cmp(&other.x)
10907 fn cmp(&self, other: &Self) -> Ordering {
10908 self.partial_cmp(other).unwrap()
13718 fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
13719 if self.1 || other.1 {
13722 self.0.partial_cmp(&other.0)
13812 /// On the other hand it won't give a false negative, if it fails than the memory was definitely not
14238 // other conditions must be upheld by the caller
14589 // Sanity-check one half of the safety requirement (we cannot check the other half).
14974 //! The `&str` type is one of the two main string types, the other being `String`.
17434 /// In other words, remove all characters `c` such that `f(c)` returns `false`.
17612 /// graphemes. In other words, it may not be what a human considers the
17678 #[must_use = "use `.truncate()` if you don't need the other half"]
17681 let other = self.vec.split_off(at);
17682 unsafe { String::from_utf8_unchecked(other) }
18134 fn eq(&self, other: &String) -> bool {
18135 PartialEq::eq(&self[..], &other[..])
18138 fn ne(&self, other: &String) -> bool {
18139 PartialEq::ne(&self[..], &other[..])
18149 fn eq(&self, other: &$rhs) -> bool {
18150 PartialEq::eq(&self[..], &other[..])
18153 fn ne(&self, other: &$rhs) -> bool {
18154 PartialEq::ne(&self[..], &other[..])
18162 fn eq(&self, other: &$lhs) -> bool {
18163 PartialEq::eq(&self[..], &other[..])
18166 fn ne(&self, other: &$lhs) -> bool {
18167 PartialEq::ne(&self[..], &other[..])
18254 fn add(mut self, other: &str) -> String {
18255 self.push_str(other);
18266 fn add_assign(&mut self, other: &str) {
18267 self.push_str(other);
19164 fn cmp(&self, other: &Self) -> Ordering {
19165 Ord::cmp(&**self, &**other)
19176 fn eq(&self, other: &Cow<'b, C>) -> bool {
19177 PartialEq::eq(&**self, &**other)
19187 fn partial_cmp(&self, other: &Cow<'a, B>) -> Option<Ordering> {
19188 PartialOrd::partial_cmp(&**self, &**other)
19408 // from other crates, but since this can only appear for lang items, it doesn't seem worth fixing.
19455 // Module with internal macros used by other modules (needs to be included before other modules).
19521 //! already been dropped. In other words, `Weak` pointers do not keep the value
19591 //! // ...other fields
19597 //! // ...other fields
19626 //! // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain
19646 //! place. In order to end up with two values that point at each other, one of
19662 //! // ...other fields
19668 //! // ...other fields
20475 /// Returns `true` if there are no other `Rc` or [`Weak`] pointers to
20483 /// no other `Rc` or [`Weak`] pointers to the same allocation.
20489 /// the inner value when there are other pointers.
20521 /// Any other `Rc` or [`Weak`] pointers to the same allocation must not be dereferenced
20566 pub fn ptr_eq(this: &Self, other: &Self) -> bool {
20567 this.ptr.as_ptr() == other.ptr.as_ptr()
20574 /// If there are other `Rc` pointers to the same allocation, then `make_mut` will
20578 /// If there are no other `Rc` pointers to this allocation, then [`Weak`]
20624 // Gotta clone the data, there are other Rcs.
20641 // Weak here -- we know other Weaks can clean up for us)
20886 /// count reaches zero then the only other references (if any) are
20970 fn eq(&self, other: &Rc<T>) -> bool;
20971 fn ne(&self, other: &Rc<T>) -> bool;
20977 default fn eq(&self, other: &Rc<T>) -> bool {
20978 **self == **other
20982 default fn ne(&self, other: &Rc<T>) -> bool {
20983 **self != **other
21003 fn eq(&self, other: &Rc<T>) -> bool {
21004 Rc::ptr_eq(self, other) || **self == **other
21008 fn ne(&self, other: &Rc<T>) -> bool {
21009 !Rc::ptr_eq(self, other) && **self != **other
21034 fn eq(&self, other: &Rc<T>) -> bool {
21035 RcEqIdent::eq(self, other)
21056 fn ne(&self, other: &Rc<T>) -> bool {
21057 RcEqIdent::ne(self, other)
21081 fn partial_cmp(&self, other: &Rc<T>) -> Option<Ordering> {
21082 (**self).partial_cmp(&**other)
21099 fn lt(&self, other: &Rc<T>) -> bool {
21100 **self < **other
21117 fn le(&self, other: &Rc<T>) -> bool {
21118 **self <= **other
21135 fn gt(&self, other: &Rc<T>) -> bool {
21136 **self > **other
21153 fn ge(&self, other: &Rc<T>) -> bool {
21154 **self >= **other
21175 fn cmp(&self, other: &Rc<T>) -> Ordering {
21176 (**self).cmp(&**other)
21716 /// other, even though they don't point to any allocation.
21752 pub fn ptr_eq(&self, other: &Self) -> bool {
21753 self.ptr.as_ptr() == other.ptr.as_ptr()
23376 /// already been dropped. In other words, `Weak` pointers do not keep the value
23669 // These side effects do not impact us in any way, and no other side effects are
24334 pub fn ptr_eq(this: &Self, other: &Self) -> bool {
24335 this.ptr.as_ptr() == other.ptr.as_ptr()
24539 // original reference prevents other threads from erroneously deleting
24584 /// If there are other `Arc` or [`Weak`] pointers to the same allocation,
24641 // invalidate the other weak refs.
24672 /// no other `Arc` or [`Weak`] pointers to the same allocation.
24678 /// the inner value when there are other pointers.
24719 /// Any other `Arc` or [`Weak`] pointers to the same allocation must not be dereferenced
24779 /// count reaches zero then the only other references (if any) are
24804 // with other threads unless we are going to delete the object. This
25080 // "stale" read of 0 is fine), and any other value is
25122 /// either direction when other threads are manipulating any `Arc`s or
25168 /// other, even though they don't point to any allocation.
25204 pub fn ptr_eq(&self, other: &Self) -> bool {
25205 self.ptr.as_ptr() == other.ptr.as_ptr()
25231 // where are *no other* weak pointers in existence. (So we can't be
25311 fn eq(&self, other: &Arc<T>) -> bool;
25312 fn ne(&self, other: &Arc<T>) -> bool;
25318 default fn eq(&self, other: &Arc<T>) -> bool {
25319 **self == **other
25322 default fn ne(&self, other: &Arc<T>) -> bool {
25323 **self != **other
25337 fn eq(&self, other: &Arc<T>) -> bool {
25338 Arc::ptr_eq(self, other) || **self == **other
25342 fn ne(&self, other: &Arc<T>) -> bool {
25343 !Arc::ptr_eq(self, other) && **self != **other
25367 fn eq(&self, other: &Arc<T>) -> bool {
25368 ArcEqIdent::eq(self, other)
25388 fn ne(&self, other: &Arc<T>) -> bool {
25389 ArcEqIdent::ne(self, other)
25409 fn partial_cmp(&self, other: &Arc<T>) -> Option<Ordering> {
25410 (**self).partial_cmp(&**other)
25426 fn lt(&self, other: &Arc<T>) -> bool {
25427 *(*self) < *(*other)
25443 fn le(&self, other: &Arc<T>) -> bool {
25444 *(*self) <= *(*other)
25460 fn gt(&self, other: &Arc<T>) -> bool {
25461 *(*self) > *(*other)
25477 fn ge(&self, other: &Arc<T>) -> bool {
25478 *(*self) >= *(*other)
25497 fn cmp(&self, other: &Arc<T>) -> Ordering {
25498 (**self).cmp(&**other)
26062 //! locale uses a decimal separator other than a dot.
26082 //! The syntax for the formatting language used is drawn from other languages,
27340 /// Moves all elements from `other` to the end of the list.
27342 /// This reuses all the nodes from `other` and moves them into `self`. After
27343 /// this operation, `other` becomes empty.
27370 pub fn append(&mut self, other: &mut Self) {
27372 None => mem::swap(self, other),
27376 if let Some(mut other_head) = other.head.take() {
27382 self.tail = other.tail.take();
27383 self.len += mem::replace(&mut other.len, 0);
27389 /// Moves all elements from `other` to the begin of the list.
27391 pub fn prepend(&mut self, other: &mut Self) {
27393 None => mem::swap(self, other),
27397 if let Some(mut other_tail) = other.tail.take() {
27403 self.head = other.head.take();
27404 self.len += mem::replace(&mut other.len, 0);
28631 fn spec_extend(&mut self, ref mut other: LinkedList<T>) {
28632 self.append(other);
28650 fn eq(&self, other: &Self) -> bool {
28651 self.len() == other.len() && self.iter().eq(other)
28654 fn ne(&self, other: &Self) -> bool {
28655 self.len() != other.len() || self.iter().ne(other)
28664 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
28665 self.iter().partial_cmp(other)
28672 fn cmp(&self, other: &Self) -> Ordering {
28673 self.iter().cmp(other)
28683 fn clone_from(&mut self, other: &Self) {
28684 let mut iter_other = other.iter();
28685 if self.len() > other.len() {
28686 self.split_off(other.len());
29389 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
29390 self.id().partial_cmp(&other.id())
29395 fn cmp(&self, other: &Self) -> Ordering {
29396 self.id().cmp(&other.id())
29401 fn eq(&self, other: &Self) -> bool {
29402 self.id().eq(&other.id())
29449 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
29450 Some(self.cmp(other))
29455 fn cmp(&self, other: &Self) -> Ordering {
29456 match (self, other) {
29465 fn eq(&self, other: &Self) -> bool {
29466 self.cmp(&other) == Equal
29495 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
29496 Some(self.cmp(other))
29501 fn cmp(&self, other: &Self) -> Ordering {
29502 assert!(ptr::eq(self.1, other.1));
29503 let ord = self.0.cmp(&other.0);
29509 fn eq(&self, other: &Self) -> bool {
29510 assert!(ptr::eq(self.1, other.1));
29511 self.0.eq(&other.0)
29847 /// and possibly other factors. Using linear search, searching for a random element is expected
29852 /// any other key, as determined by the [`Ord`] trait, changes while it is in the map. This is
30730 /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.
30752 /// Moves all elements from `other` into `Self`, leaving `other` empty.
30781 pub fn append(&mut self, other: &mut Self)
30786 if other.is_empty() {
30790 // We can just swap `self` and `other` if `self` is empty.
30792 mem::swap(self, other);
30797 let other_iter = mem::take(other).into_iter();
31774 fn eq(&self, other: &BTreeMap<K, V>) -> bool {
31775 self.len() == other.len() && self.iter().zip(other).all(|(a, b)| a == b)
31785 fn partial_cmp(&self, other: &BTreeMap<K, V>) -> Option<Ordering> {
31786 self.iter().partial_cmp(other.iter())
31793 fn cmp(&self, other: &BTreeMap<K, V>) -> Ordering {
31794 self.iter().cmp(other.iter())
32189 /// to any other item, as determined by the [`Ord`] trait, changes while it is in the set. This is
32241 fn clone_from(&mut self, other: &Self) {
32242 self.map.clone_from(&other.map);
32301 // iterate all of `self` and some of `other`, spotting matches along the way
32306 // iterate `self`, look up in `other`
32447 /// i.e., the values that are in `self` but not in `other`,
32467 pub fn difference<'a>(&'a self, other: &'a BTreeSet<T>) -> Difference<'a, T>
32478 if let (Some(other_min), Some(other_max)) = (other.first(), other.last()) {
32496 _ if self.len() <= other.len() / ITER_PERFORMANCE_TIPPING_SIZE_DIFF => {
32497 DifferenceInner::Search { self_iter: self.iter(), other_set: other }
32501 other_iter: other.iter().peekable(),
32508 /// i.e., the values that are in `self` or in `other` but not in both,
32528 pub fn symmetric_difference<'a>(&'a self, other: &'a BTreeSet<T>) -> SymmetricDifference<'a, T>
32532 SymmetricDifference(MergeIterInner::new(self.iter(), other.iter()))
32536 /// i.e., the values that are both in `self` and `other`,
32556 pub fn intersection<'a>(&'a self, other: &'a BTreeSet<T>) -> Intersection<'a, T>
32567 if let (Some(other_min), Some(other_max)) = (other.first(), other.last()) {
32577 _ if self.len() <= other.len() / ITER_PERFORMANCE_TIPPING_SIZE_DIFF => {
32578 IntersectionInner::Search { small_iter: self.iter(), large_set: other }
32580 _ if other.len() <= self.len() / ITER_PERFORMANCE_TIPPING_SIZE_DIFF => {
32581 IntersectionInner::Search { small_iter: other.iter(), large_set: self }
32583 _ => IntersectionInner::Stitch { a: self.iter(), b: other.iter() },
32589 /// i.e., all the values in `self` or `other`, without duplicates,
32607 pub fn union<'a>(&'a self, other: &'a BTreeSet<T>) -> Union<'a, T>
32611 Union(MergeIterInner::new(self.iter(), other.iter()))
32679 /// Returns `true` if `self` has no elements in common with `other`.
32697 pub fn is_disjoint(&self, other: &BTreeSet<T>) -> bool
32701 self.intersection(other).next().is_none()
32705 /// i.e., `other` contains at least all the values in `self`.
32722 pub fn is_subset(&self, other: &BTreeSet<T>) -> bool
32726 // Same result as self.difference(other).next().is_none()
32728 if self.len() > other.len() {
32738 if let (Some(other_min), Some(other_max)) = (other.first(), other.last()) {
32741 return false; // other is empty
32758 if self_iter.len() <= other.len() / ITER_PERFORMANCE_TIPPING_SIZE_DIFF {
32760 if !other.contains(next) {
32765 let mut other_iter = other.iter();
32781 /// i.e., `self` contains at least all the values in `other`.
32801 pub fn is_superset(&self, other: &BTreeSet<T>) -> bool
32805 other.is_subset(self)
33015 /// In other words, remove all elements `e` such that `f(&e)` returns `false`.
33037 /// Moves all elements from `other` into `Self`, leaving `other` empty.
33066 pub fn append(&mut self, other: &mut Self)
33070 self.map.append(&mut other.map);
34156 /// Returns the leftmost leaf edge in or underneath a node - in other words, the edge
34169 /// Returns the rightmost leaf edge in or underneath a node - in other words, the edge
34767 fn eq(&self, other: &Self) -> bool {
34768 self.0 == other.0
34775 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
34776 self.0.partial_cmp(&other.0)
34781 fn cmp(&self, other: &Self) -> Ordering {
34782 self.0.cmp(&other.0)
35698 // during insertion, otherwise other test cases may fail or be less useful.
36353 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
36354 Some(self.cmp(other))
36360 fn cmp(&self, other: &Self) -> Ordering {
36361 let ord = self.0.cmp(&other.0);
36367 fn eq(&self, other: &Self) -> bool {
36368 self.0.eq(&other.0)
36937 // do not cause segfaults when used with zero-sized values. All other map behavior is
37873 /// contains a value, that value doesn't occur in the other source (or
38107 /// node, and derive every other node's height from it.
38175 /// Returns a raw ptr to avoid invalidating other references to this node.
38217 /// Returns a raw ptr to avoid invalidating other references to this node.
38279 fn eq(&self, other: &Self) -> bool {
38281 if node.eq(&other.node) {
38282 debug_assert_eq!(*height, other.height);
38412 // to avoid aliasing with outstanding references to other elements,
38451 /// without invalidating other references to the node.
38486 /// no cleanup is done on any of the keys, values and other children.
38490 /// it will not invalidate other handles or references to the root node.
38516 /// cannot be other references to the tree.
38674 fn eq(&self, other: &Self) -> bool {
38676 node.eq(&other.node) && *idx == other.idx
38803 // Create backpointer without invalidating other references to the node.
38915 // reference (Rust issue #73987) and invalidate any other references
39546 // to other nodes in the tree.
39805 /// tree. The other nodes, those that are not the root nor a rightmost edge,
39825 /// The other nodes, those that are not the root nor a rightmost edge,
40100 fn eq(&self, other: &$rhs) -> bool {
40101 if self.len() != other.len() {
40105 let (oa, ob) = other[..].split_at(sa.len());
40457 fn clone_from(&mut self, other: &Self) {
40458 self.truncate(other.len());
40460 let mut iter = PairSlices::from(self, other);
41151 // At all other times, element positions are unaffected.
42324 #[must_use = "use `.truncate()` if you don't need the other half"]
42331 let mut other = VecDeque::with_capacity(other_len);
42342 ptr::copy_nonoverlapping(first_half.as_ptr().add(at), other.ptr(), amount_in_first);
42347 other.ptr().add(amount_in_first),
42357 other.ptr(),
42365 other.head = other.wrap_index(other_len);
42367 other
42370 /// Moves all the elements of `other` into `self`, leaving `other` empty.
42389 pub fn append(&mut self, other: &mut Self) {
42391 self.extend(other.drain(..));
42396 /// In other words, remove all elements `e` such that `f(&e)` returns false.
43004 fn eq(&self, other: &VecDeque<A>) -> bool {
43005 if self.len() != other.len() {
43009 let (oa, ob) = other.as_slices();
43015 // other: [0 1 2 3|4 5]
43053 fn partial_cmp(&self, other: &VecDeque<A>) -> Option<Ordering> {
43054 self.iter().partial_cmp(other.iter())
43061 fn cmp(&self, other: &VecDeque<A>) -> Ordering {
43062 self.iter().cmp(other.iter())
43209 fn from(mut other: Vec<T>) -> Self {
43210 let len = other.len();
43220 let cap = cmp::max(min_cap, other.capacity()).next_power_of_two();
43221 if other.capacity() != cap {
43222 other.reserve_exact(cap - len);
43227 let (other_buf, len, capacity) = other.into_raw_parts();
43265 fn from(mut other: VecDeque<T>) -> Self {
43266 other.make_contiguous();
43269 let other = ManuallyDrop::new(other);
43270 let buf = other.buf.ptr();
43271 let len = other.len();
43272 let cap = other.cap();
43274 if other.tail != 0 {
43275 ptr::copy(buf.add(other.tail), buf, len);
44300 //! fn cmp(&self, other: &Self) -> Ordering {
44304 //! other.cost.cmp(&self.cost)
44305 //! .then_with(|| self.position.cmp(&other.position))
44311 //! fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
44312 //! Some(self.cmp(other))
44429 /// item's ordering relative to any other item, as determined by the `Ord`
44970 /// Moves all the elements of `other` into `self`, leaving `other` empty.
44991 pub fn append(&mut self, other: &mut Self) {
44992 if self.len() < other.len() {
44993 swap(self, other);
44998 self.data.append(&mut other.data);
45033 /// In other words, remove all elements `e` such that `f(&e)` returns
45815 fn spec_extend(&mut self, ref mut other: BinaryHeap<T>) {
45816 self.append(other);
46186 // Since the other branch already panics eagerly (via `reserve()`) we do the same here.
46681 // on the adapter implementations (beyond `impl<I: Trait> Trait for Adapter<I>`) only depend on other
46684 // several other specializations already depend on.
47026 /// A `Vec` can be mutable. On the other hand, slices are read-only objects.
47985 /// is serving as a buffer for other code, particularly over FFI:
48190 /// In other words, remove all elements `e` such that `f(&e)` returns `false`.
48476 /// Moves all the elements of `other` into `Self`, leaving `other` empty.
48493 pub fn append(&mut self, other: &mut Self) {
48495 self.append_elements(other.as_slice() as _);
48496 other.set_len(0);
48500 /// Appends elements to `Self` from other buffer.
48502 unsafe fn append_elements(&mut self, other: *const [T]) {
48503 let count = unsafe { (*other).len() };
48506 unsafe { ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) };
48639 #[must_use = "use `.truncate()` if you don't need the other half"]
48664 let mut other = Vec::with_capacity_in(other_len, self.allocator().clone());
48666 // Unsafely `set_len` and copy items to `other`.
48669 other.set_len(other_len);
48671 ptr::copy_nonoverlapping(self.as_ptr().add(at), other.as_mut_ptr(), other.len());
48673 other
48908 /// Iterates over the slice `other`, clones each element, and then appends
48909 /// it to this `Vec`. The `other` vector is traversed in-order.
48926 pub fn extend_from_slice(&mut self, other: &[T]) {
48927 self.spec_extend(other.iter())
49160 fn clone_from(&mut self, other: &Self) {
49162 self.truncate(other.len());
49164 // self.len <= other.len due to the truncate above, so the
49166 let (init, tail) = other.split_at(self.len());
49451 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
49452 PartialOrd::partial_cmp(&**self, &**other)
49463 fn cmp(&self, other: &Self) -> Ordering {
49464 Ord::cmp(&**self, &**other)
49926 fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] }
49928 fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
51261 fn eq(&self, other: &Self) -> bool {
51262 PartialEq::eq(&**self, &**other)
51265 fn ne(&self, other: &Self) -> bool {
51266 PartialEq::ne(&**self, &**other)
51272 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
51273 PartialOrd::partial_cmp(&**self, &**other)
51276 fn lt(&self, other: &Self) -> bool {
51277 PartialOrd::lt(&**self, &**other)
51280 fn le(&self, other: &Self) -> bool {
51281 PartialOrd::le(&**self, &**other)
51284 fn ge(&self, other: &Self) -> bool {
51285 PartialOrd::ge(&**self, &**other)
51288 fn gt(&self, other: &Self) -> bool {
51289 PartialOrd::gt(&**self, &**other)
51295 fn cmp(&self, other: &Self) -> Ordering {
51296 Ord::cmp(&**self, &**other)
51754 fn clone_from(&mut self, other: &Self) {
51755 if self.len() == other.len() {
51756 self.clone_from_slice(&other);
51758 *self = other.clone();