Function rustc_resolve::diagnostics::show_candidates
source · fn show_candidates(
tcx: TyCtxt<'_>,
err: &mut Diagnostic,
use_placement_span: Option<Span>,
candidates: &[ImportSuggestion],
instead: Instead,
found_use: FoundUse,
mode: DiagnosticMode,
path: Vec<Segment>,
append: &str
) -> bool
Expand description
When an entity with a given name is not available in scope, we search for
entities with that name in all crates. This method allows outputting the
results of this search in a programmer-friendly way. If any entities are
found and suggested, returns true
, otherwise returns false
.