mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +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
|
* `n_foo` -- number of foos
|
||||||
* `foo_idx` -- index of `foo`
|
* `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
|
## Early Returns
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue