The OwningRef module in rustc_data_structures, which seems to be a copy of this crate (perhaps with small additions?), has known soundness issues.
I wrote an article about the soundness problems here.
It's used in rustc in MetadataRef and related things. (I don't know if it's used anywhere else).
I don't know of any actual unsafe use of this crate in rustc, but I haven't actually tried to look for any.
IMO, in order to keep the code safe, either owning_ref should be replaced with something else, or otherwise, it should be updated to contain the known fixes to these soundness problems (here).
The
OwningRefmodule in rustc_data_structures, which seems to be a copy of this crate (perhaps with small additions?), has known soundness issues.I wrote an article about the soundness problems here.
It's used in rustc in
MetadataRefand related things. (I don't know if it's used anywhere else).I don't know of any actual unsafe use of this crate in rustc, but I haven't actually tried to look for any.
IMO, in order to keep the code safe, either
owning_refshould be replaced with something else, or otherwise, it should be updated to contain the known fixes to these soundness problems (here).