paralegal_flow::utils::resolve

Function expect_resolve_string_to_def_id

Source
pub fn expect_resolve_string_to_def_id(
    tcx: TyCtxt<'_>,
    path: &str,
    relaxed: bool,
) -> Option<DefId>
Expand description

A small helper wrapper around def_path_res that represents a common way that def_path_res is used. In the case of errors they are reported to the user and None is returned so the caller has the option of making progress before exiting.