pub struct CallEdge {
pub caller: FuncId,
pub callee: FuncId,
pub range: SourceRange,
}Expand description
One direct call, from the function whose body holds it to the function it names.
Sema records these as it checks the calls, and
check_safe is the one thing that reads them: a
safe function calling one that is not gets a diagnostic
worded in C rather than rustc’s “call to unsafe function”. A call through
a pointer has no edge — there is no callee to name — and is left to
rustc, which refuses it in a safe function like any other unsafe
operation.
Fields§
§caller: FuncIdThe function the call was written in.
callee: FuncIdThe function it calls.
range: SourceRangeWhere the callee was named, which is where a diagnostic points.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallEdge
impl RefUnwindSafe for CallEdge
impl Send for CallEdge
impl Sync for CallEdge
impl Unpin for CallEdge
impl UnsafeUnpin for CallEdge
impl UnwindSafe for CallEdge
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
Mutably borrows from an owned value. Read more