Skip to main content

Module fn_info

Module fn_info 

Source

Re-exportsΒ§

use rustc_hir::Safety; πŸ”’
use rustc_hir::def::DefKind; πŸ”’
use rustc_hir::def_id::DefId; πŸ”’
use rustc_middle::mir::ProjectionElem; πŸ”’
use rustc_middle::mir::StatementKind; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::AssocKind; πŸ”’
use rustc_middle::ty::Mutability; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_middle::ty::TyKind; πŸ”’
use rustc_public::CrateDef; πŸ”’
use rustc_public::rustc_internal; πŸ”’
use rustc_span::kw; πŸ”’
use rustc_span::sym; πŸ”’
use std::collections::HashSet; πŸ”’
use std::fmt::Debug; πŸ”’
use std::fmt::Debug; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hash; πŸ”’
use syn::Expr; πŸ”’
pub use super::mir_scan::get_fn_safety;

StructsΒ§

AdtInfo
FnInfo

EnumsΒ§

FnKind

FunctionsΒ§

append_fn_with_types
assoc_fns_of_self πŸ”’
Associated function DefIds (inherent impls only) on the struct that def_id’s impl block is implemented for.
check_visibility
get_adt_def_id_by_adt_method
get_adt_via_method
get_all_mutable_methods
Find &mut self methods (mutators) on the same struct as src_def_id.
get_all_std_fns_by_rustc_public
get_cons
get_mutated_fields
Return field indices that a &mut self method writes to.
get_muts
Find &mut self methods (mutators) on the same struct as def_id.
get_ptr_deref_dummy_def_id
get_type
is_externally_reachable
is_mut_self_method πŸ”’
Returns true when def_id is a method taking &mut self (a mutator).
is_self_ty πŸ”’
Returns true when ty denotes Self: either the generic Self param (ty.is_param(0)) or a type equal to the impl’s self type.
parse_expr_into_number
parse expr into number.
public_field_indices πŸ”’
returns_wrapped_self
Returns true when the function is a β€œwrapped” constructor that returns Option<Self> / Result<Self, _> rather than a bare Self.
self_adt_def πŸ”’
The AdtDef that def_id’s impl block is implemented for, if any.