mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Document awkward names
This commit is contained in:
parent
d8c6e192f7
commit
86cc93ebe3
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