about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-24 16:44:31 +0800
committerGitHub <noreply@github.com>2018-08-24 16:44:31 +0800
commit973428d5224f552341bf2d105d1b702cbdab0ceb (patch)
treeea83417057ea7f9077a1cee1d1e893c54bdfcedc /src/libsyntax/parse
parentab5a71b0347bbcb66152210a5c358908972534c6 (diff)
parente7709b3d44da921a65c009eb52492830141d330a (diff)
downloadrust-973428d5224f552341bf2d105d1b702cbdab0ceb.tar.gz
rust-973428d5224f552341bf2d105d1b702cbdab0ceb.zip
Rollup merge of #53503 - kornelski:master, r=dtolnay
Discourage overuse of mem::forget

Some uses of `mem::forget` have been replaced by better methods of `Box`, so I've removed obsoleted use-cases from these docs.

I've removed emphasis on leaking, because it's not obvious `mem::forget` does not guarantee leaking of memory: memory of stack-allocated objects and values partially moved out of `Box` will still be freed. That's a potential error when used to pass objects to FFI, so it's better to direct users to `Box::into_raw` instead.
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions