Return-position noalias · Issue #385 · rust-lang/unsafe-code-guidelines (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@RalfJung

Description

@RalfJung

LLVM supports the noalias attribute in return position, and Rust uses that for functions that return Box. However the semantics of that are mostly unclear I think -- this has very little to do with argument-position noalias.

I think in Stacked Borrows terms it corresponds to something like: give the return value a fresh tag, and remove all other tags from the stack.

Questions: