Mehdi Akiki

Posts tagged "rustc internals"

  • Published on

    Article · Through the layers

    DefId vs HirId in the Rust Compiler

    Two identifiers, two different jobs. DefId names a definition across the whole compiler pipeline and across crates. HirId points to a node in the syntax tree of the current crate. Mixing them up is the first stumbling block when reading rustc source code.