Skip to content

UnwindSafe docs are unclear #65717

Open
Open
@gnzlbg

Description

@gnzlbg

After reading the current docs of panic::UnwindSafe I am left with the feeling that the explanation of the concept of "panic safety" and its auto trait has only been handwaved. The docs point to the RFC, which does a better job, but I still do not feel like I fully understood what "panic safety" is, what does UnwindSafe convey, and when is it ok to use AssertUnwindSafe or not.

I feel like the docs could do a much better job at explaining all of this, and that some examples in the RFC would help, but I don't think that any documentation we currently have about this is enough.

This is a complex topic and I have no experience teaching it to others, but if somebody has done that, their feedback should probably be taken into account.

I think the API docs are very important to get right because they are currently the only teaching materials that we have about this aspect of the language. The Rust book does not cover this either, and the nomicon Exception safety has very few words to say about this.

cc @steveklabnik @rust-lang/docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions