Skip to main content Module type_certainty Copy item path Source use crate::paths::PathNS ; π use crate::paths::lookup_path ; π use rustc_ast::LitFloatType; π use rustc_ast::LitIntType; π use rustc_ast::LitKind; π use rustc_hir::def::DefKind; π use rustc_hir::def::Res; π use rustc_hir::def_id::DefId; π use rustc_hir::intravisit::InferKind; π use rustc_hir::intravisit::Visitor; π use rustc_hir::intravisit::walk_qpath; π use rustc_hir::intravisit::walk_ty; π use rustc_hir as hir; π use rustc_hir::AmbigArg; π use rustc_hir::Expr; π use rustc_hir::ExprKind; π use rustc_hir::GenericArgs; π use rustc_hir::HirId; π use rustc_hir::Node; π use rustc_hir::Param; π use rustc_hir::PathSegment; π use rustc_hir::QPath; π use rustc_hir::TyKind; π use rustc_lint::LateContext; π use rustc_middle::ty; π use rustc_middle::ty::AdtDef; π use rustc_middle::ty::GenericArgKind; π use rustc_middle::ty::Ty; π use rustc_span::Span; π use certainty::Certainty ; π use certainty::Meet as _; π use certainty::join ; π use certainty::meet ; π certainty π CertaintyVisitor π adt_def_id π contains_param π expr_type_certainty π Determine the type certainty of expr. in_arg indicates that the expression happens within
the evaluation of a function or method call argument. expr_type_is_certain A heuristic to tell whether an expressionβs type can be determined purely from its
subexpressions, and the arguments and locals they use. Put another way, this function
tries to tell whether an expressionβs type can be determined without appeal to the surrounding
context. generic_args_certainty π param_certainty π Tries to tell whether param resolves to something certain, e.g., a non-wildcard type if
present. The certainty DefId is cleared before returning. path_segment_certainty π qpath_certainty π Tries to tell whether a QPath resolves to something certain, e.g., whether all of its path
segments generic arguments are instantiated. self_ty π type_certainty π type_is_inferable_from_arguments π update_res π For at least some QPath::TypeRelative, the path segmentβs res can be Res::Err.
update_res tries to fix the resolution when parent_certainty is Certain(Some(..)).