Skip to content

refactor(dfir_lang): more precise span on generic diagnostics#2676

Merged
MingweiSamuel merged 1 commit intomainfrom
mingwei/generics-span
Mar 20, 2026
Merged

refactor(dfir_lang): more precise span on generic diagnostics#2676
MingweiSamuel merged 1 commit intomainfrom
mingwei/generics-span

Conversation

@MingweiSamuel
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 20:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .stderr fixtures 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.

@MingweiSamuel MingweiSamuel force-pushed the mingwei/generics-span branch from 8fd6925 to 9a82014 Compare March 20, 2026 21:02
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 20, 2026

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: e496db8
Status: ✅  Deploy successful!
Preview URL: https://6df96dba.hydroflow.pages.dev
Branch Preview URL: https://mingwei-generics-span.hydroflow.pages.dev

View logs

@MingweiSamuel MingweiSamuel merged commit e99802f into main Mar 20, 2026
19 checks passed
@MingweiSamuel MingweiSamuel deleted the mingwei/generics-span branch March 20, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants