]> git.lizzy.rs Git - rust.git/commitdiff
fix wording on panics in binary operators on RefCells"
authorMazdak Farrokhzad <twingoow@gmail.com>
Tue, 27 Feb 2018 14:48:50 +0000 (15:48 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Tue, 27 Feb 2018 14:48:50 +0000 (15:48 +0100)
src/libcore/cell.rs

index e91b2c793c5e5372727e99bf539f4bdad29c4131..419ae96b94bd6caf4fc425b9363239c19d490dfc 100644 (file)
@@ -885,7 +885,7 @@ fn default() -> RefCell<T> {
 impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> {
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn eq(&self, other: &RefCell<T>) -> bool {
         *self.borrow() == *other.borrow()
@@ -899,7 +899,7 @@ impl<T: ?Sized + Eq> Eq for RefCell<T> {}
 impl<T: ?Sized + PartialOrd> PartialOrd for RefCell<T> {
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn partial_cmp(&self, other: &RefCell<T>) -> Option<Ordering> {
         self.borrow().partial_cmp(&*other.borrow())
@@ -907,7 +907,7 @@ fn partial_cmp(&self, other: &RefCell<T>) -> Option<Ordering> {
 
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn lt(&self, other: &RefCell<T>) -> bool {
         *self.borrow() < *other.borrow()
@@ -915,7 +915,7 @@ fn lt(&self, other: &RefCell<T>) -> bool {
 
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn le(&self, other: &RefCell<T>) -> bool {
         *self.borrow() <= *other.borrow()
@@ -923,7 +923,7 @@ fn le(&self, other: &RefCell<T>) -> bool {
 
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn gt(&self, other: &RefCell<T>) -> bool {
         *self.borrow() > *other.borrow()
@@ -931,7 +931,7 @@ fn gt(&self, other: &RefCell<T>) -> bool {
 
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn ge(&self, other: &RefCell<T>) -> bool {
         *self.borrow() >= *other.borrow()
@@ -942,7 +942,7 @@ fn ge(&self, other: &RefCell<T>) -> bool {
 impl<T: ?Sized + Ord> Ord for RefCell<T> {
     /// # Panics
     ///
-    /// Panics if the value is currently mutably borrowed.
+    /// Panics if the value in either `RefCell` is currently borrowed.
     #[inline]
     fn cmp(&self, other: &RefCell<T>) -> Ordering {
         self.borrow().cmp(&*other.borrow())