fix(codegen): fail closed on discarded lowering errors#2152
Merged
Conversation
899221b to
9190f33
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.
Summary
Silent
.ok()?swallows in the lowering/codegen pipeline are removed. A classification error in the owned-aggregate value-class path now propagates: the type is excluded from the drop allow-set and a diagnostic is emitted, rather than silently resolving to "not an owned aggregate" and skipping drop synthesis. A spawn-state lowering error now guarantees a diagnostic instead of returning a bareNone. The DWARF base-type and field-index sites—infallible by construction—use.expect()with an invariant note. One symbol-classifier site retains.ok()?with a// JUSTIFIED:comment: a malformed suffix is a benign non-match, not a swallowed error.Verification
make test-hew-ratchet: pass — 0 expected failures / 0 actual failures; ratchet PASSED (load-bearing check for the drop/value-class surface)make build: pass — all crates compiledcargo fmt -p hew-mir -p hew-codegen-rs -- --check: passcargo clippy -p hew-mir -p hew-codegen-rs --all-targets: pass — zero warningsast-grep scan --rule rules/rust/fail-closed/ok-question-in-lowering.yml: 0 unannotated hitsscripts/ast-grep-lint.sh): pass — 0 error-severity matchesOut of scope
NotYetImplementedfallback) do not yet have dedicated reject fixtures. These branches guard internal-invariant conditions that are not currently reachable from a known.hewconstruct; fixtures will be added when such a construct is identified.