Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#106371 - RalfJung:no-ret-position-noalias, r=…
…nikic do not add noalias in return position `noalias` as a return attribute in LLVM indicates that the returned pointer does not alias anything else that is reachable from the caller, *including things reachable before this function call*. This is clearly not the case with a function like `fn id(Box<T>) -> Box<T>`, so we cannot use this attribute. Fixes rust-lang/unsafe-code-guidelines#385 (including an actual miscompilation that `@comex` managed to produce).
- Loading branch information