Skip to main content

Module type_certainty

Module type_certainty 

Source

Re-exportsΒ§

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; πŸ”’

ModulesΒ§

certainty πŸ”’

StructsΒ§

CertaintyVisitor πŸ”’

FunctionsΒ§

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(..)).