refactor(dfir_lang): more precise span on generic diagnostics#2676
Merged
MingweiSamuel merged 1 commit intomainfrom Mar 20, 2026
Merged
refactor(dfir_lang): more precise span on generic diagnostics#2676MingweiSamuel merged 1 commit intomainfrom
MingweiSamuel merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refines dfir_lang operator-generic diagnostics so errors highlight the specific lifetime vs type-argument portion of the generic argument list, and updates compile-fail expectations accordingly.
Changes:
- Added
OpInstGenerics::{persistence_args_span,type_args_span}helpers to compute tighter spans for diagnostics. - Updated generic-argument constraint diagnostics to use the more precise spans when available.
- Updated compile-fail
.stderrfixtures for lattice operator wrong-generic tests to match the new caret locations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dfir_lang/src/graph/mod.rs | Adds span-derivation helpers for persistence vs type generic arguments. |
| dfir_lang/src/graph/meta_graph.rs | Uses the new helpers to emit more precise Diagnostic::spanned locations. |
| dfir_rs/tests/compile-fail-stable/surface_lattice_reduce_wronggeneric.stderr | Updates expected diagnostic span/caret location. |
| dfir_rs/tests/compile-fail-stable/surface_lattice_fold_wronggeneric.stderr | Updates expected diagnostic span/caret location. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8fd6925 to
9a82014
Compare
Deploying hydro with
|
| Latest commit: |
e496db8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6df96dba.hydroflow.pages.dev |
| Branch Preview URL: | https://mingwei-generics-span.hydroflow.pages.dev |
0f7e735 to
e496db8
Compare
luckyworkama
approved these changes
Mar 20, 2026
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.
No description provided.