mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
4d6992bc18
Use pointers in `cell::{Ref,RefMut}` to avoid `noalias` When `Ref` and `RefMut` were based on references, they would get LLVM `noalias` attributes that were incorrect, because that alias guarantee is only true until the guard drops. A `&RefCell` on the same value can get a new borrow that aliases the previous guard, possibly leading to miscompilation. Using `NonNull` pointers in `Ref` and `RefCell` avoids `noalias`. Fixes the library side of #63787, but we still might want to explore language solutions there. |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
Cargo.toml |