Rollup merge of #36589 - jpadkins:option_docs_safety_wording_fix, r=bluss

fixed the safety header/wording in option.rs

Fixes #36581

screenshot of the rendered documentation: http://imgur.com/14kLVrA

r? @steveklabnik
This commit is contained in:
Jonathan Turner 2016-09-22 11:25:01 -07:00 committed by GitHub
commit 5d4c0edb69

View File

@ -296,16 +296,14 @@ pub fn expect(self, msg: &str) -> T {
/// Moves the value `v` out of the `Option<T>` if it is `Some(v)`.
///
/// # Panics
///
/// Panics if the self value equals `None`.
///
/// # Safety note
///
/// In general, because this function may panic, its use is discouraged.
/// Instead, prefer to use pattern matching and handle the `None`
/// case explicitly.
///
/// # Panics
///
/// Panics if the self value equals `None`.
///
/// # Examples
///
/// ```