Change CamelCase to UpperCamelCase

Brings the terminology in line with the rest of the project, see
<https://github.com/rust-lang/rfcs/pull/2389>.

Connects to #2194.
This commit is contained in:
Carol (Nichols || Goulding) 2023-01-23 13:19:32 -05:00
parent 4404cbcc35
commit f2a78f64b6
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
2 changed files with 5 additions and 4 deletions

View File

@ -546,6 +546,7 @@ unsafety
unsized
unsynchronized
Unyank
UpperCamelCase
URIs
UsefulType
username

View File

@ -33,9 +33,9 @@ the duplication by introducing a generic type parameter in a single function.
To parameterize the types in a new single function, we need to name the type
parameter, just as we do for the value parameters to a function. You can use
any identifier as a type parameter name. But well use `T` because, by
convention, type parameter names in Rust are short, often just a letter, and Rusts
type-naming convention is CamelCase. Short for “type,” `T` is the default
choice of most Rust programmers.
convention, type parameter names in Rust are short, often just a letter, and
Rusts type-naming convention is UpperCamelCase. Short for “type,” `T` is the
default choice of most Rust programmers.
When we use a parameter in the body of the function, we have to declare the
parameter name in the signature so the compiler knows what that name means.
@ -274,7 +274,7 @@ method.
### Performance of Code Using Generics
You might be wondering whether there is a runtime cost when using generic type
parameters. The good news is that using generic types won't make your program run
parameters. The good news is that using generic types won't make your program run
any slower than it would with concrete types.
Rust accomplishes this by performing monomorphization of the code using