diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-09-18 11:35:47 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-09-19 10:39:00 -0400 |
| commit | 032fdef3befba19c80d2ec6d59f9309bbc359e68 (patch) | |
| tree | 4623968f49505bd53bbd7c390c195adc0696c894 /src | |
| parent | f130e7d9db5834908a8457d6287f7e95addc2d21 (diff) | |
| download | rust-032fdef3befba19c80d2ec6d59f9309bbc359e68.tar.gz rust-032fdef3befba19c80d2ec6d59f9309bbc359e68.zip | |
define span
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/README.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc/README.md b/src/librustc/README.md index e72acb43fba..48bc9f91619 100644 --- a/src/librustc/README.md +++ b/src/librustc/README.md @@ -187,6 +187,12 @@ pointers for understanding them better. - sess -- the **compiler session**, which stores global data used throughout compilation - side tables -- because the AST and HIR are immutable once created, we often carry extra information about them in the form of hashtables, indexed by the id of a particular node. +- span -- a location in the user's source code, used for error + reporting primarily. These are like a file-name/line-number/column + tuple on steroids: they carry a start/end point, and also track + macro expansions and compiler desugaring. All while being packed + into a few bytes (really, it's an index into a table). See the + `Span` datatype for more. - substs -- the **substitutions** for a given generic type or item (e.g., the `i32, u32` in `HashMap<i32, u32>`) - tcx -- the "typing context", main data structure of the compiler (see `librustc/ty`). |
