Add doc for deconstruct_option_or_result · rust-lang/rust@a776e5f

File tree

1 file changed

lines changed

  • compiler/rustc_hir_typeck/src/fn_ctxt

1 file changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -521,6 +521,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

521521

false

522522

}

523523
524+

/// If `ty` is `Option<T>`, returns `T, T, None`.

525+

/// If `ty` is `Result<T, E>`, returns `T, T, Some(E, E)`.

526+

/// Otherwise, returns `None`.

524527

fn deconstruct_option_or_result(

525528

&self,

526529

found_ty: Ty<'tcx>,