diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-18 13:32:32 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-18 13:32:32 +0100 |
commit | a3947129c5dc60cf051260c364833946f92e3350 (patch) | |
tree | a69f4c1574f8f3ff97d21b4877f6530c979efce3 /docs | |
parent | b8dfc331abbfce6aad0c248c91c57bd9890a668f (diff) | |
parent | 0d201638d9c7710795fa24765f7b761432cd5622 (diff) |
Merge #5794
5794: Simplify building a symbol hierarchy
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/style.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md index 8effddcda..2454087e8 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md | |||
@@ -148,8 +148,13 @@ struct Foo { | |||
148 | Use boring and long names for local variables ([yay code completion](https://github.com/rust-analyzer/rust-analyzer/pull/4162#discussion_r417130973)). | 148 | Use boring and long names for local variables ([yay code completion](https://github.com/rust-analyzer/rust-analyzer/pull/4162#discussion_r417130973)). |
149 | The default name is a lowercased name of the type: `global_state: GlobalState`. | 149 | The default name is a lowercased name of the type: `global_state: GlobalState`. |
150 | Avoid ad-hoc acronyms and contractions, but use the ones that exist consistently (`db`, `ctx`, `acc`). | 150 | Avoid ad-hoc acronyms and contractions, but use the ones that exist consistently (`db`, `ctx`, `acc`). |
151 | The default name for "result of the function" local variable is `res`. | 151 | |
152 | The default name for "I don't really care about the name" variable is `it`. | 152 | Default names: |
153 | |||
154 | * `res` -- "result of the function" local variable | ||
155 | * `it` -- I don't really care about the name | ||
156 | * `n_foo` -- number of foos | ||
157 | * `foo_idx` -- index of `foo` | ||
153 | 158 | ||
154 | # Collection types | 159 | # Collection types |
155 | 160 | ||