Function rustc_query_impl::make_query::resolve_instance[][src]

pub fn resolve_instance<'tcx>(
    tcx: QueryCtxt<'tcx>,
    key: resolve_instance<'tcx>
) -> QueryStackFrame
Expand description

Attempt to resolve the given DefId to an Instance, for the given generics args (SubstsRef), returning one of:

  • Ok(Some(instance)) on success
  • Ok(None) when the SubstsRef are still too generic, and therefore don’t allow finding the final Instance
  • Err(ErrorReported) when the Instance resolution process couldn’t complete due to errors elsewhere - this is distinct from Ok(None) to avoid misleading diagnostics when an error has already been/will be emitted, for the original cause