Expand description
Utility functions, general purpose structs and extension traits
Modules§
- print 🔒
Structs§
- A struct that can be used to apply a
FnMut
to everyPlace
in a MIR object via thevisit::Visitor
trait. Usually used to accumulate information about the places. - Create a hash for this object that is no longer than six hex digits
- A bit-set implemented with a
u16
, supporting domains up to 16 elements.
Enums§
- This exists to distinguish different types of functions, which is necessary because depending on the type of function, the method of requesting its signature from
TyCtxt
differs.
Traits§
- Extension trait for function calls (e.g.
mir::TerminatorKind
andmir::Terminator
) that lets you decompose the call into a convenient (function definition, arguments, return place) tuple in such cases when - A trait for types that can be converted into a [
mir::LocalDefId
] viaTyCtxt
. - This is meant as an extension trait for
ast::Attribute
. The main method of interest ismatch_extract
,matches_path
is interesting if you want to check if this attribute has the path of interest but you do not care about its payload. - Extension trait for [
hir::Node
]. This lets up implement methods on [hir::Node
].Self
should only ever be instantiated as [hir::Node
].
Functions§
- This function exists to deal with
#[tracing::instrument]
. In that case, sadly, theSpan
value attached to a body directly refers only to the#[tracing::instrument]
macro call. This function instead reconstitutes the span from the collection of spans on each statement. - Get a reasonable, but not guaranteed unique name for this item
- Returns whether this method is expected to have a body we can analyze.
- Try and normalize the provided generics.
- Write all elements from
it
into the formatterfmt
usingf
, separating them withsep
Type Aliases§
- A simplified version of the argument list that is stored in a
TerminatorKind::Call
.