pub struct Inlined {
pub from: Pc,
pub to: Pc,
pub callee: FunctionId,
pub site: Span,
pub locals: Vec<Local>,
}Expand description
A body that was written elsewhere and expanded into this one.
[from, to) is the run of this function’s program counters the expansion
occupies — from where the call stood to where its answer landed —
callee is whose instructions they are, and site is where the call was
written.
site is the whole of what an error chain lost. Machine::call_chain
walks the live frames and reads each one’s call site; an expansion has no
frame, so its call site was not there to read, and an error raised inside
one named where it happened and not where it was called from. One span per
expansion is what puts that back.
Fields§
§from: Pc§to: Pc§callee: FunctionId§site: Span§locals: Vec<Local>The names the expanded body bound, in this function’s slots and this function’s counters.
Here rather than in Function::locals, and that is not tidiness. A
caller’s binding and an expanded body’s parameter can be bound at the
same program counter — the caller’s let raised = n + 1 and the
callee’s n, when the argument needed no copy — and a reader sorting
one table by “which expansion contains this counter” cannot tell them
apart. Which body declared a name is not something a counter answers,
so it is recorded rather than derived.
Trait Implementations§
impl Eq for Inlined
impl StructuralPartialEq for Inlined
Auto Trait Implementations§
impl Freeze for Inlined
impl RefUnwindSafe for Inlined
impl Send for Inlined
impl Sync for Inlined
impl Unpin for Inlined
impl UnsafeUnpin for Inlined
impl UnwindSafe for Inlined
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.