Skip to content

Commit 2777dee

Browse files
authored
add string interning wikipedia link (#960)
1 parent 25016ae commit 2777dee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/overview.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ we'll talk about that later.
3232
- The token stream passes through a higher-level lexer located in
3333
[`rustc_parse`] to prepare for the next stage of the compile process. The
3434
[`StringReader`] struct is used at this stage to perform a set of validations
35-
and turn strings into interned symbols (_interning_ is discussed later).
35+
and turn strings into interned symbols (_interning_ is discussed later).
36+
[String interning] is a way of storing only one immutable
37+
copy of each distinct string value.
38+
3639
- The lexer has a small interface and doesn't depend directly on the
3740
diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain
3841
data which are emitted in `rustc_parse::lexer::mod` as real diagnostics.
@@ -97,6 +100,7 @@ we'll talk about that later.
97100
- The different libraries/binaries are linked together to produce the final
98101
binary.
99102

103+
[String interning]: https://en.wikipedia.org/wiki/String_interning
100104
[`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html
101105
[`rustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html
102106
[`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html

0 commit comments

Comments
 (0)