Issue #789: nikaia describe: method paths, generic results and explicit type arguments for Rust crates

Open and answer this issue on GitHub.

ready · opened 2026-10-24 · updated 2026-10-24 · 0 comments

How it came up

While building #788, a builder probed a project that depends on all 14 unsafe crates of the repository. nikaia describe drafts the simple free functions well (for example in crc32c and low_bits). A ledger that covers a whole crate fails on three gaps:

  1. Method and associated-function paths stay unanswered. For example checked_text::CheckedText::check: describe drafts no entry for it.
  2. A generic result is drafted as ??. text_key::bytes is drafted as [T](x: ref T) -> ??, and a call on its result is refused with NK1245.
  3. A call cannot be given explicit type arguments. text_key::is_text[String]() does not parse. Before this is built, check whether Part I/II already allows explicit type arguments at a call. If it does not, this point becomes a decision of its own and is split off.

Decided for #788 in the meantime

The shipped ledgers list only safe, non-generic free functions. An unsafe fn is not listed at all: a call to it stays NK1171 (fail-closed). A function behind a cfg gate (crc32c u64 needs sse4.2; low_bits u64/u32 need bmi2) carries the gate in a comment.

To build

  1. describe drafts methods and associated functions of pub types (Type::f, x.f()). Test: CheckedText::check gets an entry and a call from Nikaia checks.
  2. A generic result whose type follows from a parameter is drafted as that type, not ??. Test: text_key::bytes and a call on its result without NK1245.
  3. Explicit type arguments at a call, if the specification allows them (see point 3 above). Test: text_key::is_text[String]().
  4. Extend the shipped ledgers from #788 to the entries that 1–3 make possible.

Back to Open Issues