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