Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Use String in Rc::into_raw examples #61421

Merged
merged 1 commit into from
Jun 14, 2019
Merged

docs: Use String in Rc::into_raw examples #61421

merged 1 commit into from
Jun 14, 2019

Commits on Jun 13, 2019

  1. 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
    #60766 (review).
    
    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:-).
    vorner committed Jun 13, 2019
    Configuration menu
    Copy the full SHA
    79e5839 View commit details
    Browse the repository at this point in the history