Skip to content

[Document] Clarify that Generics::to_token() tokenises Generic::params only - #2079

Open
altimeter-130ft wants to merge 1 commit into
dtolnay:masterfrom
altimeter-130ft:carrots/topic-generics-to_tokens-document
Open

[Document] Clarify that Generics::to_token() tokenises Generic::params only#2079
altimeter-130ft wants to merge 1 commit into
dtolnay:masterfrom
altimeter-130ft:carrots/topic-generics-to_tokens-document

Conversation

@altimeter-130ft

Copy link
Copy Markdown

This change emphasises that only Generics::param is tokenised by Generics::to_tokens().

This design is required by the Rust syntax upon the generic parameters of the functions and traits. The better clarification is desirable because the quote::ToTokens::to_tokens() implementations emit every single code piece on most of the Rust syntax's symbol types in syn.

Document the rationale for that design in Generics.

Signed-off-by: Seigo Tanimura <seigo.tanimura@gmail.com>
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.

1 participant