Skip to content

Conversation

crlf0710
Copy link
Member

Current text recommends naming lifetime parameter with single letter too much. I've seen this adds a lot to beginner's confusion. Change the order to stop encouraging that.

Also, added discouraging underline version of _rs suffix based on real world crates doing so.

@@ -25,7 +25,7 @@ traits) and `snake_case` for "value-level" constructs. More precisely:
| Statics | `SCREAMING_SNAKE_CASE` |
| Constants | `SCREAMING_SNAKE_CASE` |
| Type parameters | concise `UpperCamelCase`, usually single uppercase letter: `T` |
| Lifetimes | short `lowercase`, usually a single letter: `'a`, `'de`, `'src` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about this. A single letter is the overwhelmingly common case.

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