Expand description
Give useful errors and suggestions to users when an item canβt be found or is otherwise invalid.
Re-exportsΒ§
use core::ops::ControlFlow;πuse std::borrow::Cow;πuse std::path::PathBuf;πuse hir::Expr;πuse rustc_ast::ast::Mutability;πuse rustc_attr_ir::diagnostic::CustomDiagnostic;πuse rustc_attr_ir::find_attr;πuse rustc_attr_ir::lang_items::LangItem;πuse rustc_data_structures::fx::FxIndexMap;πuse rustc_data_structures::fx::FxIndexSet;πuse rustc_data_structures::sorted_map::SortedMap;πuse rustc_data_structures::unord::UnordSet;πuse rustc_errors::Applicability;πuse rustc_errors::Diag;πuse rustc_errors::MultiSpan;πuse rustc_errors::StashKey;πuse rustc_errors::StringPart;πuse rustc_errors::listify;πuse rustc_errors::pluralize;πuse rustc_errors::struct_span_code_err;πuse rustc_hir::def::CtorKind;πuse rustc_hir::def::DefKind;πuse rustc_hir::def::Res;πuse rustc_hir::def_id::DefId;πuse rustc_hir::intravisit;πuse rustc_hir::intravisit::Visitor;πuse rustc_hir as hir;πuse rustc_hir::ExprKind;πuse rustc_hir::HirId;πuse rustc_hir::Node;πuse rustc_hir::PathSegment;πuse rustc_hir::QPath;πuse rustc_hir::is_range_literal;πuse rustc_infer::infer::BoundRegionConversionTime;πuse rustc_infer::infer::RegionVariableOrigin;πuse rustc_middle::ty::fast_reject::DeepRejectCtxt;πuse rustc_middle::ty::fast_reject::TreatParams;πuse rustc_middle::ty::fast_reject::simplify_type;πuse rustc_middle::ty::print::PrintTraitRefExt as _;πuse rustc_middle::ty::print::with_crate_prefix;πuse rustc_middle::ty::print::with_crate_prefix;πuse rustc_middle::ty::print::with_forced_trimmed_paths;πuse rustc_middle::ty::print::with_forced_trimmed_paths;πuse rustc_middle::ty;πuse rustc_middle::ty::GenericArgKind;πuse rustc_middle::ty::IsSuggestable;πuse rustc_middle::ty::Ty;πuse rustc_middle::ty::TyCtxt;πuse rustc_middle::ty::TypeVisitableExt;πuse rustc_span::def_id::DefIdSet;πuse rustc_span::DUMMY_SP;πuse rustc_span::ErrorGuaranteed;πuse rustc_span::ExpnKind;πuse rustc_span::FileName;πuse rustc_span::Ident;πuse rustc_span::MacroKind;πuse rustc_span::OrdSpan;πuse rustc_span::Span;πuse rustc_span::Symbol;πuse rustc_span::bug;πuse rustc_span::edit_distance;πuse rustc_span::kw;πuse rustc_span::sym;πuse rustc_trait_selection::error_reporting::traits::DefIdOrName;πuse rustc_trait_selection::infer::InferCtxtExt;πuse rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;πuse rustc_trait_selection::traits::FulfillmentError;πuse rustc_trait_selection::traits::Obligation;πuse rustc_trait_selection::traits::ObligationCauseCode;πuse rustc_trait_selection::traits::supertraits;πuse tracing::debug;πuse tracing::info;πuse tracing::instrument;πuse tracing::instrument;πuse super::probe::AutorefOrPtrAdjustment;πuse super::probe::IsSuggestion;πuse super::probe::Mode;πuse super::probe::ProbeScope;πuse super::CandidateSource;πuse super::MethodError;πuse super::NoMatchData;πuse crate::diagnostics;πuse crate::diagnostics::CandidateTraitNote;πuse crate::diagnostics::NoAssociatedItem;πuse crate::expr_use_visitor::expr_place;πuse crate::method::probe::UnsatisfiedPredicates;πuse crate::Expectation;πuse crate::FnCtxt;πuse rustc_errors::codes::*;π
StructsΒ§
- Trait
Bound πDuplicate Tracker - Tracks trait bounds and detects duplicates between ref and non-ref versions of self types.
This is used to condense error messages when the same trait bound appears for both
Tand&T(or&mut T). - Trait
Info π
EnumsΒ§
- Self
Source π
FunctionsΒ§
- all_
traits π - Retrieves all traits in this crate and any dependent crates,
and wraps them into
TraitInfofor custom sorting. - print_
disambiguation_ πhelp