import { IdentId, Key, Mod } from "../ctx.ts"; import { DefKind, Res } from "./res.ts"; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/late/struct.Rib.html export type Rib = { kind: RibKind; bindings: Map, Res>; }; // https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/late/enum.RibKind.html export type RibKind = /// No restriction needs to be applied. | { tag: "normal" } /// We passed through a function, closure or coroutine signature. Disallow labels. | { tag: "fn" } /// We passed through an item scope. Disallow upvars. | { tag: "item"; defKind: DefKind } /// We passed through a module. | { tag: "mod"; mod: Mod } /// We passed through a block (same as module, see Rust). | { tag: "block" };