Function autoken::unborrow_mutably

source ·
pub const fn unborrow_mutably<T: ?Sized>()
Expand description

Virtually unacquires a mutable reference to a global token of type T.

This method is more typically called through the MutableBorrow guard’s destructor.

In regular builds, this does nothing, but when AuToken checks a given binary, it uses calls to functions like this to determine whether a program has the possibility of virtually borrowing a global token in a way which violates XOR borrowing rules.

Global token identity is lifetime-erased (i.e. &'a u32 and &'b u32 always refer to the same virtual global token). When T is Nothing, nothing happens.