Skip to content

Add #[non_exhaustive] documentation to TRPL. - #1955

Closed
davidtwco wants to merge 1 commit into
rust-lang:masterfrom
davidtwco:rfc-2008-documentation
Closed

Add #[non_exhaustive] documentation to TRPL.#1955
davidtwco wants to merge 1 commit into
rust-lang:masterfrom
davidtwco:rfc-2008-documentation

Conversation

@davidtwco

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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