Function autoken::assume_no_alias

source ·
pub fn assume_no_alias<Res>(f: impl FnOnce() -> Res) -> Res
Expand description

Asserts that the provided closure’s virtual borrows to any token will not cause any aliasing issues at runtime.

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.