Edit rustc_span documentation
Various changes to the `rustc_span` docs, including the following: - Additions to top-level docs - Edits to the source_map module docs - Edits to documentation for `Span` and `SpanData` - Added intra-docs links - Documentation for Levenshtein distances - Fixed missing punctuation
This commit is contained in:
parent
3d10d3e49d
commit
a8775d44e9
5 changed files with 71 additions and 46 deletions
|
@ -1,9 +1,11 @@
|
|||
//! The `SourceMap` tracks all the source code used within a single crate, mapping
|
||||
//! Types for tracking pieces of source code within a crate.
|
||||
//!
|
||||
//! The [`SourceMap`] tracks all the source code used within a single crate, mapping
|
||||
//! from integer byte positions to the original source code location. Each bit
|
||||
//! of source parsed during crate parsing (typically files, in-memory strings,
|
||||
//! or various bits of macro expansion) cover a continuous range of bytes in the
|
||||
//! `SourceMap` and are represented by `SourceFile`s. Byte positions are stored in
|
||||
//! `Span` and used pervasively in the compiler. They are absolute positions
|
||||
//! `SourceMap` and are represented by [`SourceFile`]s. Byte positions are stored in
|
||||
//! [`Span`] and used pervasively in the compiler. They are absolute positions
|
||||
//! within the `SourceMap`, which upon request can be converted to line and column
|
||||
//! information, source code snippets, etc.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue