Issue #1450: lower-std accepts a pausing read (fs::walk, fs::read_to_string) in a sync tools function, and rustc then fails on .await

Open and answer this issue on GitHub.

ready · opened 2026-11-08 · updated 2026-11-08 · 0 comments

Found by #1438 (commit 368746dd).

The defect

A program refuses a pausing call in a sync function with NK2202. lower-std does not: a sync function in crates/nikaia-std/src/tools/*.nika that calls fs::walk or fs::read_to_string lowers to a .await in a non-async Rust fn, and the build stops in rustc instead of in Nikaia. The test a_sync_tool_that_calls_a_pausing_read_is_refused covers the program side.

Done when

lower-std refuses such a function with NK2202 and the same message a program gets.

To build

  1. Probe: a sync fn in a scratch tools file calling fs::read_to_string, run through lower-std; it lowers today.
  2. Run the same pausing-call check over the tools files that check_program runs over a program (find where lower-std skips it). Test: a tests/compiler/ case that lowers a tools-shaped file and expects NK2202 in .stderr.

Files and limits

The check’s .nika and its lowered .rs. No new Rust.

Back to Open Issues