about summary refs log tree commit diff
path: root/src/doc/rustc
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2022-06-10 11:16:48 -0700
committerEric Huss <eric@huss.org>2023-06-05 11:51:37 -0700
commit9e0c19d5c20d2f5e2323e1b9f0fadd3276df4daf (patch)
treed328b841f0327fd670321d78a7290cf1d086cc31 /src/doc/rustc
parent769f938aea2c0d270cafc8f66c283d98461f701a (diff)
downloadrust-9e0c19d5c20d2f5e2323e1b9f0fadd3276df4daf.tar.gz
rust-9e0c19d5c20d2f5e2323e1b9f0fadd3276df4daf.zip
Clarify grammar for decimal-number cannot have leading zeroes.
Diffstat (limited to 'src/doc/rustc')
-rw-r--r--src/doc/rustc/src/symbol-mangling/v0.md15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/doc/rustc/src/symbol-mangling/v0.md b/src/doc/rustc/src/symbol-mangling/v0.md
index dfd53434251..fbb813a339a 100644
--- a/src/doc/rustc/src/symbol-mangling/v0.md
+++ b/src/doc/rustc/src/symbol-mangling/v0.md
@@ -983,12 +983,16 @@ the suffixed name has the same semantics as the original.
 ## Common rules
 [decimal-number]: #common-rules
 [digit]: #common-rules
+[non-zero-digit]: #common-rules
 [lower]: #common-rules
 [upper]: #common-rules
 
-> [decimal-number] → *[digit]* {*[digit]*}
+> [decimal-number] → \
+> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `0` \
+> &nbsp;&nbsp; | *[non-zero-digit]* {*[digit]*}
 >
-> [digit] → `0` | `1` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9`
+> [non-zero-digit] → `1` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9` \
+> [digit] → `0` | *[non-zero-digit]*
 >
 > [lower] → `a` |`b` |`c` |`d` |`e` |`f` |`g` |`h` |`i` |`j` |`k` |`l` |`m` |`n` |`o` |`p` |`q` |`r` |`s` |`t` |`u` |`v` |`w` |`x` |`y` |`z`
 >
@@ -1131,11 +1135,14 @@ The following is a summary of all of the productions of the symbol grammar.
 > [vendor-specific-suffix] → (`.` | `$`) *[suffix]* \
 > [suffix] → {*byte*}
 >
-> [decimal-number] → *[digit]* {*[digit]*}
+> [decimal-number] → \
+> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `0` \
+> &nbsp;&nbsp; | *[non-zero-digit]* {*[digit]*}
 >
 > [base-62-number] → { *[digit]* | *[lower]* | *[upper]* } `_`
 >
-> [digit] → `0` | `1` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9` \
+> [non-zero-digit] → `1` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9` \
+> [digit] → `0` | *[non-zero-digit]* \
 > [lower] → `a` |`b` |`c` |`d` |`e` |`f` |`g` |`h` |`i` |`j` |`k` |`l` |`m` |`n` |`o` |`p` |`q` |`r` |`s` |`t` |`u` |`v` |`w` |`x` |`y` |`z` \
 > [upper] → `A` | `B` | `C` | `D` | `E` | `F` | `G` | `H` | `I` | `J` | `K` | `L` | `M` | `N` | `O` | `P` | `Q` | `R` | `S` | `T` | `U` | `V` | `W` | `X` | `Y` | `Z`