From 86cc93ebe39666a5063a9bc2646708b8711a8d4a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 15 Oct 2020 18:14:30 +0200 Subject: [PATCH] Document awkward names --- docs/dev/style.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/dev/style.md b/docs/dev/style.md index 20f1b6253e..883a6845d9 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