import { DefId, HirId, IdentId } from "../ctx.ts"; import { Mod } from "../main.ts"; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/late/struct.Rib.html export type Rib = { kind: RibKind; bindings: Map; }; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/late/enum.RibKind.html export type RibKind = | { tag: "normal" } | { tag: "fn" } | { tag: "item"; defKind: DefKind } | { tag: "mod"; mod: Mod }; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/late/enum.RibKind.html export type Res = | { tag: "error" } | { tag: "def"; kind: DefKind; id: DefId } | { tag: "local"; id: HirId }; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def/enum.DefKind.html export type DefKind = | { tag: "mod" } | { tag: "struct" } | { tag: "enum" } | { tag: "variant" } | { tag: "ty_alias" } | { tag: "ty_param" } | { tag: "fn" } | { tag: "ctor" } | { tag: "use" } | { tag: "field" };