Update inline_call assist doc example

This commit is contained in:
Lukas Wirth 2021-07-05 14:24:25 +02:00
parent 2bc4f9e371
commit 2579dc6d82
4 changed files with 33 additions and 32 deletions

View file

@ -330,6 +330,15 @@ pub mod option {
#[lang = "Some"]
Some(T),
}
impl<T> Option<T> {
pub const fn unwrap(self) -> T {
match self {
Some(val) => val,
None => panic!("called `Option::unwrap()` on a `None` value"),
}
}
}
}
// endregion:option