Skip to content

Commit f8ebb3f

Browse files
committed
fix wording on panics in binary operators on RefCells"
1 parent bde8555 commit f8ebb3f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libcore/cell.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ impl<T:Default> Default for RefCell<T> {
885885
impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> {
886886
/// # Panics
887887
///
888-
/// Panics if the value is currently mutably borrowed.
888+
/// Panics if the value in either `RefCell` is currently borrowed.
889889
#[inline]
890890
fn eq(&self, other: &RefCell<T>) -> bool {
891891
*self.borrow() == *other.borrow()
@@ -899,39 +899,39 @@ impl<T: ?Sized + Eq> Eq for RefCell<T> {}
899899
impl<T: ?Sized + PartialOrd> PartialOrd for RefCell<T> {
900900
/// # Panics
901901
///
902-
/// Panics if the value is currently mutably borrowed.
902+
/// Panics if the value in either `RefCell` is currently borrowed.
903903
#[inline]
904904
fn partial_cmp(&self, other: &RefCell<T>) -> Option<Ordering> {
905905
self.borrow().partial_cmp(&*other.borrow())
906906
}
907907

908908
/// # Panics
909909
///
910-
/// Panics if the value is currently mutably borrowed.
910+
/// Panics if the value in either `RefCell` is currently borrowed.
911911
#[inline]
912912
fn lt(&self, other: &RefCell<T>) -> bool {
913913
*self.borrow() < *other.borrow()
914914
}
915915

916916
/// # Panics
917917
///
918-
/// Panics if the value is currently mutably borrowed.
918+
/// Panics if the value in either `RefCell` is currently borrowed.
919919
#[inline]
920920
fn le(&self, other: &RefCell<T>) -> bool {
921921
*self.borrow() <= *other.borrow()
922922
}
923923

924924
/// # Panics
925925
///
926-
/// Panics if the value is currently mutably borrowed.
926+
/// Panics if the value in either `RefCell` is currently borrowed.
927927
#[inline]
928928
fn gt(&self, other: &RefCell<T>) -> bool {
929929
*self.borrow() > *other.borrow()
930930
}
931931

932932
/// # Panics
933933
///
934-
/// Panics if the value is currently mutably borrowed.
934+
/// Panics if the value in either `RefCell` is currently borrowed.
935935
#[inline]
936936
fn ge(&self, other: &RefCell<T>) -> bool {
937937
*self.borrow() >= *other.borrow()
@@ -942,7 +942,7 @@ impl<T: ?Sized + PartialOrd> PartialOrd for RefCell<T> {
942942
impl<T: ?Sized + Ord> Ord for RefCell<T> {
943943
/// # Panics
944944
///
945-
/// Panics if the value is currently mutably borrowed.
945+
/// Panics if the value in either `RefCell` is currently borrowed.
946946
#[inline]
947947
fn cmp(&self, other: &RefCell<T>) -> Ordering {
948948
self.borrow().cmp(&*other.borrow())

0 commit comments

Comments
 (0)