Add doc for deconstruct_option_or_result · rust-lang/rust@a776e5f (original) (raw)
File tree
1 file changed
lines changed
- compiler/rustc_hir_typeck/src/fn_ctxt
1 file changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -521,6 +521,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | ||
| 521 | 521 | false |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | +/// If `ty` is `Option`, returns `T, T, None`. | |
| 525 | + /// If `ty` is `Result<T, E>`, returns `T, T, Some(E, E)`. | |
| 526 | + /// Otherwise, returns `None`. | |
| 524 | 527 | fn deconstruct_option_or_result( |
| 525 | 528 | &self, |
| 526 | 529 | found_ty: Ty<'tcx>, |