mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Update inline_call
assist doc example
This commit is contained in:
parent
2bc4f9e371
commit
2579dc6d82
4 changed files with 33 additions and 32 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue