about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-14 12:37:28 +0000
committerbors <bors@rust-lang.org>2019-06-14 12:37:28 +0000
commitfc550d4295a654f9e7c621d957d81fbf1426c70b (patch)
tree1644e6d39d4471a7bf5c98a09a77dde021a2f587 /src/test/ui/thinlto
parente699ea096fcc2fc9ce8e8bcf884e11496a31cc9f (diff)
parent79e58399920d6a0a7c4050bfb26c64fbc10562ec (diff)
downloadrust-fc550d4295a654f9e7c621d957d81fbf1426c70b.tar.gz
rust-fc550d4295a654f9e7c621d957d81fbf1426c70b.zip
Auto merge of #61421 - vorner:string-in-rc-into-raw-docs, r=RalfJung
docs: Use String in Rc::into_raw examples

It is unclear if accessing an integer after `drop_in_place` has been
called on it is undefined behaviour or not, as demonstrated by the
discussion in
https://github.com/rust-lang/rust/pull/60766#pullrequestreview-243414222.

Avoid these uncertainties by using String which frees memory in its
`drop_in_place` to make sure this is undefined behaviour. The message in
the docs should be to watch out and not access the data after that, not
discussing when one maybe could get away with it O:-).
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions