mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge #6244
6244: Document awkward names r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
1de2020109
1 changed files with 12 additions and 0 deletions
|
@ -403,6 +403,18 @@ Default names:
|
|||
* `n_foo` -- number of foos
|
||||
* `foo_idx` -- index of `foo`
|
||||
|
||||
Many names in rust-analyzer conflict with keywords.
|
||||
We use mangled names instead of `r#ident` syntax:
|
||||
|
||||
```
|
||||
struct -> strukt
|
||||
crate -> krate
|
||||
impl -> imp
|
||||
trait -> trait_
|
||||
fn -> func
|
||||
enum -> enum_
|
||||
mod -> module
|
||||
```
|
||||
|
||||
## Early Returns
|
||||
|
||||
|
|
Loading…
Reference in a new issue