Skip to content

Commit 5cd252c

Browse files
author
Jonathan Turner
authored
Rollup merge of rust-lang#36589 - jpadkins:option_docs_safety_wording_fix, r=bluss
fixed the safety header/wording in option.rs Fixes rust-lang#36581 screenshot of the rendered documentation: http://imgur.com/14kLVrA r? @steveklabnik
2 parents 3c2558a + 8b02aa1 commit 5cd252c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/libcore/option.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,14 @@ impl<T> Option<T> {
296296

297297
/// Moves the value `v` out of the `Option<T>` if it is `Some(v)`.
298298
///
299-
/// # Panics
300-
///
301-
/// Panics if the self value equals `None`.
302-
///
303-
/// # Safety note
304-
///
305299
/// In general, because this function may panic, its use is discouraged.
306300
/// Instead, prefer to use pattern matching and handle the `None`
307301
/// case explicitly.
308302
///
303+
/// # Panics
304+
///
305+
/// Panics if the self value equals `None`.
306+
///
309307
/// # Examples
310308
///
311309
/// ```

0 commit comments

Comments
 (0)