#spans #interning #symbols #macro #version #position #string-interning

nightly jomy-ap-rustc_span

Automatically published version of the package rustc_span in the rust-lang/rust repository from version 1.83.0 The publishing script for this crate lives at: https://github.com/rust-analyzer/rustc-auto-publish

2 releases (1 stable)

new 1.83.0 Nov 29, 2024
0.1.0 Nov 29, 2024

#379 in Rust patterns

Download history 251/week @ 2024-11-25

251 downloads per month
Used in 12 crates

MIT/Apache

1MB
23K SLoC

Source positions and related helper functions.

Important concepts in this module include:

  • the span, represented by SpanData and related types;
  • source code as represented by a SourceMap; and
  • interned strings, represented by Symbols, with some common symbols available statically in the [sym] module.

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 SyntaxContext and ExpnData.

Note

This API is completely unstable and subject to change.

Dependencies

~7–36MB
~575K SLoC