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

Add #[non_exhaustive] documentation to TRPL. #1955

Closed
wants to merge 1 commit into from

Conversation

davidtwco
Copy link
Member

This PR adds documentation for RFC 2008 (tracking issue rust-lang/rust#44109) to the reference. This feature is not yet stabilized, so this shouldn't be merged until that happens. This won't pass CI as the code examples use #[non_exhaustive].


I wasn't at all sure where to include documentation about this feature or how much to include. It requires some about of knowledge of structs, enums, privacy, external crates and pattern matching. I'm more than happy to move where it is and re-write parts that don't fit with the rest of the book, I tried to keep a consistent voice and style with the surrounding chapters.

@steveklabnik
Copy link
Member

Hi there! First of all, thanks for this PR, and sorry for not replying sooner.

I wasn't at all sure where to include documentation about this feature or how much to include.

Yes, these kinds of things can be tricky. Unfortunately, we can only accept small changes to the book, and this feature requires too much new text. So I'm going to have to not accept this, not because it's not good (I didn't even read it), but due to those restrictions. Sorry about that :/

We will eventually decide if it goes in the book or not; I've opened #2093 to track this. Thank you and sorry again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants