Open and answer this issue on GitHub.
ready · opened 2026-11-16 · updated 2026-11-16 · 0 comments
This is item 4 of #1561, split out. That issue’s grammar fix landed without it.
Found: nikaia build sometimes generates Rust that rustc rejects, for example a borrow error from a grammar action. When that happens, the build reports only NK1127. rustc’s own message, with its file and line in the generated crate, is not shown. To find the real error, you have to run cargo in the build directory by hand.
To build
build (and check --rustc) fails, print the first rustc diagnostic after NK1127. Print its message and its span in the generated file.tests/compiler/ test whose program makes the generated crate fail rustc, if one can still be written. Otherwise, a test of the note’s format through whatever hook the build uses for its rustc output.Done when a build that fails in rustc shows rustc’s first error under NK1127, without a manual cargo run.
Part of #1561.