Repository navigation
emitter(v1-seed): derive Debug/PartialEq/serde on phantom type-tag markers - #5400
Closed
gunbai-bot[bot] wants to merge 1 commit into
Closed
gunbai-bot[bot] wants to merge 1 commit into
gunbai-bot[bot] wants to merge 1 commit into
Conversation
…rkers Enum variants used as type-level kinds (the Quantity/Scale tags Memory/One/ Power/Gibi/... in Measure<Memory, One, Nat>) are emitted as bare unit structs (`pub struct Memory;`) with no derives. Any carrier that mentions them then fails its own derive closed: Measure<Q,S,M> derives Debug/Clone/PartialEq + serde, which requires Q,S: those traits, so the seed gets E0277 (`Memory` doesn't implement `Debug`) and E0369 (`==` cannot be applied to a Measure). Give the markers the matching derive set (Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize) via a single-authority helper `rust_phantom_zst_marker_def`, used by both the per-enum and per-module marker emitters. Verified by execution (2-stage proxy on the integration seed): E0277 3 -> 0 and E0369 2 -> 0 (-5), no new error classes. Helper confirmed emitted into the regenerated v1_compiler_emit_rust.rs. emitter-completeness slice, NOT seed-green; seed-green lands in #5325. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Consolidated into #5413 (freeze consolidation of the durable gunbc lanes). Branch retained; reopen if the consolidation is unwound. |
briansrls
added a commit
that referenced
this pull request
Jun 20, 2026
…) (#5413) Consolidates the durable freeze lanes onto one branch (each constituent closed in favor of this): - #5402 dsl_compile_clean dual-root gate-widen (Strategy A keystone) - #5395 .length() -> .count() dissolution - #5407 anemia CONFIRM eval corpus (additive) - #5400 phantom type-tag derives - #5396 Measure-alias count peel (E0560) Plus a carried fix for a pre-existing main defect (from #5406): clippy::manual_is_multiple_of + fmt in v2_whole_tree_parse_scan.rs (main's rust_monolith gate is skipped on main pushes, so it went uncaught; this is the first post-#5406 PR to touch a .rs and run clippy against it). Local receipt: cargo fmt --all --check clean; cargo clippy --all-targets -- -D warnings exit 0; cargo test -p v1-compiler-tests interp_recorded_fixture/wet_hermetic/resolve_expr_types_retraversal = 28 passed, 0 failed. All other floor gates (dsl_compile_clean, source_root_ingest, emit_host, layering, 557-witness corpus) were green on the prior runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Phantom type-tag markers — enum variants used as type-level kinds (the
Quantity/ScaletagsMemory/One/Power/Gibi/… inMeasure<Memory, One, Nat>) — are emitted as bare unit structs (pub struct Memory;) with no derives. Give them the matching derive set via a single-authority helperrust_phantom_zst_marker_def, used by both the per-enum and per-module marker emitters.Why
Any carrier that mentions a marker fails its own derive closed:
Measure<Q,S,M>derivesDebug/Clone/PartialEq+ serde, which (via the derive macro's bounds) requiresQ,S: Debug/PartialEq/…. With the markers underived, the seed gets E0277 (Memorydoesn't implementDebug) and E0369 (==cannot be applied to aMeasure).Verification (2-stage proxy on the integration seed)
E0277 3 → 0andE0369 2 → 0(−5), no new error classes. The helper is confirmed emitted into the regeneratedv1_compiler_emit_rust.rs(definition + both call sites).Scope
.dag-only — committed seed unchanged, main keeps building. emitter-completeness slice, NOT seed-green; seed-green lands in #5325.🤖 Generated with Claude Code