diff options
| author | hosseind88 <72156162+hosseind88@users.noreply.github.com> | 2020-11-15 20:44:06 +0330 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-15 12:14:06 -0500 |
| commit | 56d55dda66a2d1b3826aebc34016d0f54cf98351 (patch) | |
| tree | 4edff1cb68555e3ebb4af82d18318dc5b26e07c7 /src/doc/rustc-dev-guide | |
| parent | 6eafb25a51c8180285f159881238fe8af416bfce (diff) | |
add string interning wikipedia link (#960)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/overview.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/overview.md b/src/doc/rustc-dev-guide/src/overview.md index baa1e0aa635..82f2289e474 100644 --- a/src/doc/rustc-dev-guide/src/overview.md +++ b/src/doc/rustc-dev-guide/src/overview.md @@ -32,7 +32,10 @@ we'll talk about that later. - The token stream passes through a higher-level lexer located in [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations - and turn strings into interned symbols (_interning_ is discussed later). + and turn strings into interned symbols (_interning_ is discussed later). + [String interning] is a way of storing only one immutable + copy of each distinct string value. + - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics. @@ -97,6 +100,7 @@ we'll talk about that later. - The different libraries/binaries are linked together to produce the final binary. +[String interning]: https://en.wikipedia.org/wiki/String_interning [`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html [`rustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html [`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html |
