We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e1195c2 + 4ddbd6b commit a2f0cc6Copy full SHA for a2f0cc6
src/libcore/cell.rs
@@ -216,10 +216,6 @@ impl<T:Copy> Cell<T> {
216
217
/// Returns a reference to the underlying `UnsafeCell`.
218
///
219
- /// # Safety
220
- ///
221
- /// This function is `unsafe` because `UnsafeCell`'s field is public.
222
223
/// # Examples
224
225
/// ```
@@ -229,11 +225,11 @@ impl<T:Copy> Cell<T> {
229
230
226
/// let c = Cell::new(5);
231
227
232
- /// let uc = unsafe { c.as_unsafe_cell() };
228
+ /// let uc = c.as_unsafe_cell();
233
234
#[inline]
235
#[unstable(feature = "as_unsafe_cell", issue = "27708")]
236
- pub unsafe fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
+ pub fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
237
&self.value
238
}
239
0 commit comments