Re-exportsยง
use crate::macros::root_macro_call_first_node;๐use crate::res::MaybeResPath as _;๐use crate::visitors::Descend;๐use crate::visitors::Visitable;๐use crate::visitors::for_each_expr;๐use crate::visitors::for_each_expr_without_closures;๐use crate as utils;๐use crate::get_enclosing_loop_or_multi_call_closure;๐use crate::sym;๐use core::ops::ControlFlow;๐use hir::def::Res;๐use rustc_hir::intravisit;๐use rustc_hir::intravisit::Visitor;๐use rustc_hir as hir;๐use rustc_hir::Expr;๐use rustc_hir::ExprKind;๐use rustc_hir::HirId;๐use rustc_hir::HirIdSet;๐use rustc_hir_typeck::expr_use_visitor::Delegate;๐use rustc_hir_typeck::expr_use_visitor::ExprUseVisitor;๐use rustc_hir_typeck::expr_use_visitor::Place;๐use rustc_hir_typeck::expr_use_visitor::PlaceBase;๐use rustc_hir_typeck::expr_use_visitor::PlaceWithHirId;๐use rustc_lint::LateContext;๐use rustc_middle::hir::nested_filter;๐use rustc_middle::mir::FakeReadCause;๐use rustc_middle::ty;๐
Structsยง
- Binding
Usage Finder - A [
Visitor] providingare_params_used(), which can be used to check parameter binding usage within aBody. - MutVars
Delegate ๐ - Param
Binding IdCollector - A [
Visitor] that collects allHirIds bound by visited patterns.
Functionsยง
- contains_
return_ break_ continue_ macro - Checks whether the given expression contains
return,break,continue, or a macro call (which may itself contain any of those expressions). - contains_
todo_ unimplement_ macro - Checks if the given expression contains macro call to
todo!()orunimplemented!(). - is_
potentially_ local_ place - Checks whether it is possible that the given [Place] is the given local.
- is_
potentially_ mutated - Checks whether it is possible that the given variable is mutated within the given
[
Expr]. - is_
todo_ unimplemented_ macro - Checks if the given expression is a macro call to
todo!()orunimplemented!(). - is_
todo_ unimplemented_ stub - Checks if the given expression is a stub, i.e., a
todo!()orunimplemented!()expression, or a block whose last expression is atodo!()orunimplemented!(). - local_
used_ after_ expr - Checks whether the given local is used after the given [
Expr]. - local_
used_ in - Checks whether the given
Visitable(ex. an [Expr]) contains the given local. - mutated_
variables - Returns a set of mutated local variable IDs, or
Noneif mutations could not be determined.