-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
UnwindSafe docs are unclear #65717
Copy link
Copy link
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Category: 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.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Category: 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.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
After reading the current docs of
panic::UnwindSafeI 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 doesUnwindSafeconvey, and when is it ok to useAssertUnwindSafeor 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