about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--docs/dev/style.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md
index 20f1b6253e7..883a6845d91 100644
--- a/docs/dev/style.md
+++ b/docs/dev/style.md
@@ -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