Source positions and related helper functions.
Important concepts in this module include:
- the span, represented by
SpanDataand related types;
- source code as represented by a
- interned strings, represented by
Symbols, with some common symbols available statically in the
Unlike most compilers, the span contains not only the position in the source code, but also various other metadata,
such as the edition and macro hygiene. This metadata is stored in
This API is completely unstable and subject to change.
pub use hygiene::DesugaringKind;
pub use hygiene::ExpnKind;
pub use hygiene::MacroKind;
pub use hygiene::ExpnData;
pub use hygiene::ExpnHash;
pub use hygiene::ExpnId;
pub use hygiene::LocalExpnId;
pub use hygiene::SyntaxContext;
pub use symbol::sym;
pub use symbol::Symbol;
Spanused for diagnostics when we only have access to relative positions.
SourceMapto format any spans that are debug-printed during the closure’s execution.