Repository navigation
Tag the two lifetime-domain rejection demos expect-error (#593) - #602
Merged
Merged
Conversation
godofecht
force-pushed
the
doc-rejection-demos
branch
from
August 19, 2026 22:14
652920a to
d08bf88
Compare
docs/language/lifetime-domains.md shows a callback-domain function calling
malloc, then the diagnostic it produces. The diagnostic is the point of the
example, and the checker was recording it as a failure.
Found by shape rather than by reading prose: a flow block whose next fence is
a text block beginning "error:" is the page asserting a diagnostic. Three
blocks match that shape and fail on meaning. Two are these; the compiler's
message matches the documented text verbatim:
RT-safety violation: 'process' is in the `callback` lifetime domain,
which forbids allocation, but calls 'malloc'
lifetime domain violation: 'process' is in the `callback` domain but
calls 'reload_preset'
The third, docs/language/spans.md:119, is deliberately left alone. It fails
with "Undefined variable 'samples'", which is missing context rather than the
rejection the page demonstrates. Tagging it would hide an ordinary broken
example behind expect-error, which is what the issue asks not to do. It needs
same-page context instead (#584).
Closes #593
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
godofecht
force-pushed
the
doc-rejection-demos
branch
from
August 19, 2026 23:05
d08bf88 to
9a2e13f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #593.
unverified: 221 -> 219.What they are
docs/language/lifetime-domains.mdshows a callback-domain function callingmalloc, then the diagnostic it produces. The diagnostic is the example. The checker was recording it as a failure.Found by shape, not by reading prose
A flow block whose next fence is a
textblock beginningerror:is the page asserting a diagnostic. That is a precise signal; searching the prose for words like "rejected" is not, and my first pass using that found nothing while missing both of these.Three blocks in the corpus match that shape and fail on meaning.
Two are rejection demos
The compiler's message matches the documented text verbatim:
Checked by comparing the recorded detail against the page's own
textfence, not by eye.The third is deliberately left alone
docs/language/spans.md:119fails withUndefined variable 'samples'. That is missing context, not the rejection the page demonstrates. Tagging it would hide an ordinary broken example behindexpect-error, which the issue explicitly asks not to do:It needs same-page context instead, which is #584 (PR #601).
Verification
check_doc_examples.py --check-ledgerpytest tests/unit/test_docs_blocks.pyBoth entries are now
expected-errorat stagetypes, carrying the intended diagnostic, which is what the acceptance criteria asked for.