Skip to content

Commit 633de5f

Browse files
committed
Clarify we mean UpperCamelCase, not lowerCamelCase
1 parent 7a2ce51 commit 633de5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

text/0430-finalizing-naming-conventions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@ official.
2020

2121
## General naming conventions
2222

23-
In general, Rust tends to use `CamelCase` for "type-level" constructs
23+
In general, Rust tends to use `UpperCamelCase` for "type-level" constructs
2424
(types and traits) and `snake_case` for "value-level" constructs. More
2525
precisely, the proposed (and mostly followed) conventions are:
2626

2727
| Item | Convention |
2828
| ---- | ---------- |
2929
| Crates | `snake_case` (but prefer single word) |
3030
| Modules | `snake_case` |
31-
| Types | `CamelCase` |
32-
| Traits | `CamelCase` |
33-
| Enum variants | `CamelCase` |
31+
| Types | `UpperCamelCase` |
32+
| Traits | `UpperCamelCase` |
33+
| Enum variants | `UpperCamelCase` |
3434
| Functions | `snake_case` |
3535
| Methods | `snake_case` |
3636
| General constructors | `new` or `with_more_details` |
3737
| Conversion constructors | `from_some_other_type` |
3838
| Local variables | `snake_case` |
3939
| Static variables | `SCREAMING_SNAKE_CASE` |
4040
| Constant variables | `SCREAMING_SNAKE_CASE` |
41-
| Type parameters | concise `CamelCase`, usually single uppercase letter: `T` |
41+
| Type parameters | concise `UpperCamelCase`, usually single uppercase letter: `T` |
4242
| Lifetimes | short, lowercase: `'a` |
4343

4444
### Fine points
4545

46-
In `CamelCase`, acronyms count as one word: use `Uuid` rather than
46+
In `UpperCamelCase`, acronyms count as one word: use `Uuid` rather than
4747
`UUID`. In `snake_case`, acronyms are lower-cased: `is_xid_start`.
4848

4949
In `snake_case` or `SCREAMING_SNAKE_CASE`, a "word" should never

0 commit comments

Comments
 (0)