Enum flowistry_pdg::rustc::mir::LocalInfo
source · pub enum LocalInfo<'tcx> {
User(BindingForm<'tcx>),
StaticRef {
def_id: DefId,
is_thread_local: bool,
},
ConstRef {
def_id: DefId,
},
AggregateTemp,
BlockTailTemp(BlockTailInfo),
DerefTemp,
FakeBorrow,
Boring,
}
Expand description
Extra information about a some locals that’s used for diagnostics and for classifying variables into local variables, statics, etc, which is needed e.g. for unsafety checking.
Not used for non-StaticRef temporaries, the return place, or anonymous function parameters.
Variants§
User(BindingForm<'tcx>)
A user-defined local variable or function parameter
The BindingForm
is solely used for local diagnostics when generating
warnings/errors when compiling the current crate, and therefore it need
not be visible across crates.
StaticRef
A temporary created that references the static with the given DefId
.
ConstRef
A temporary created that references the const with the given DefId
AggregateTemp
A temporary created during the creation of an aggregate
(e.g. a temporary for foo
in MyStruct { my_field: foo }
)
BlockTailTemp(BlockTailInfo)
A temporary created for evaluation of some subexpression of some block’s tail expression (with no intervening statement context).
DerefTemp
A temporary created during the pass Derefer
to avoid it’s retagging
FakeBorrow
A temporary created for borrow checking.
Boring
A local without anything interesting about it.