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

C-CASE: do not encourage using one letter meaningless lifetime parameter #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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