diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-15 17:14:54 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-15 17:14:54 +0100 |
commit | 1de202010948c94658235f7cfe9b25dda0c7ddf3 (patch) | |
tree | ca5aca3c87516e1a82e4471f64890789a0a9077b | |
parent | d8c6e192f7b35c57e7ff9d167ab10db8a8cd90b4 (diff) | |
parent | 86cc93ebe39666a5063a9bc2646708b8711a8d4a (diff) |
Merge #6244
6244: Document awkward names r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r-- | docs/dev/style.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md index 20f1b6253..883a6845d 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md | |||
@@ -403,6 +403,18 @@ Default names: | |||
403 | * `n_foo` -- number of foos | 403 | * `n_foo` -- number of foos |
404 | * `foo_idx` -- index of `foo` | 404 | * `foo_idx` -- index of `foo` |
405 | 405 | ||
406 | Many names in rust-analyzer conflict with keywords. | ||
407 | We use mangled names instead of `r#ident` syntax: | ||
408 | |||
409 | ``` | ||
410 | struct -> strukt | ||
411 | crate -> krate | ||
412 | impl -> imp | ||
413 | trait -> trait_ | ||
414 | fn -> func | ||
415 | enum -> enum_ | ||
416 | mod -> module | ||
417 | ``` | ||
406 | 418 | ||
407 | ## Early Returns | 419 | ## Early Returns |
408 | 420 | ||