Skip to content

Commit 4a79424

Browse files
committed
Mention RefCell::take can panic in docs
1 parent 4ea83bf commit 4a79424

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/cell.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,10 @@ impl<T: ?Sized> RefCell<T> {
10261026
impl<T: Default> RefCell<T> {
10271027
/// Takes the wrapped value, leaving `Default::default()` in its place.
10281028
///
1029+
/// # Panics
1030+
///
1031+
/// Panics if the value is currently borrowed.
1032+
///
10291033
/// # Examples
10301034
///
10311035
/// ```

0 commit comments

Comments
 (0)