Repository navigation
The emitted-text attestation reads code outside string literals, not prose - #12203
Merged
Merged
Conversation
…prose
reference_derived_use_line_plan admitted a candidate use-line when its name was among the emitted
source's identifier tokens, string literal contents included, so std.content_hash's prose mention of
v2.std.node.Hash emitted pub use crate::v2_std_node::{Hash} -- unused, and a reverse edge the crate
partition refuses. The token set now comes from rust_code_outside_string_literals. Across the seed
eleven dead prose-attested imports drop from six mirrors; the seed compiles and regen is a fixed point.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ates {...}, so {Hash} evaluated Hash
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…no longer emits a Hash use-line Over the full v2.compiler.compile closure std_content_hash's derive of std::hash::Hash still attested a proposed Hash through the colon-splitting tokenizer. Segments after :: are marked so they never equal a candidate; path heads stay tokens. Seed regen reaches a fixed point; the seed compiles. Co-Authored-By: Claude Opus 5.5 (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.
The emitted-text attestation reads code outside string literals, not prose
Defect.
v1.compiler.emit_rustreference_derived_use_line_planadmits a proposed use-line only when the name appears among the emitted source's identifier tokens. That gate exists to reject misproposed candidates. But the token set was built from the whole emitted text, string-literal contents included.std.content_hash's grounding note mentionsv2.std.node.Hash. The emitter proposedHashforstd.content_hash, andv2.std.nodedeclarestype Hash = Fnv1a64Structural, an alias ofstd.content_hash's own type. The prose then let that candidate through, andstd_content_hash.rsemittedpub use crate::v2_std_node::{Hash};. Nothing uses it. It is harmless in one crate but is a reverse edge in any partition, becausev2.std.nodeimportsstd.content_hash.How it was found. The Pkg7e emitted-workspace plan (
v2.workflow.emitted_crate_workspace, on its own branch), once #12190 and #12200 made the two closures agree, refused at the edge merge with the typedEmitterReverseEdge std_content_hash -> v2_std_node. That refusal was added in #12147.Earliest unjustified link (DESIGN §6b): the gate treating string contents as emitted code.
rust_code_outside_string_literalsremoves escaped backslashes and quotes, splits on the remaining quote characters, and keeps the segments outside literals. The token set is built from that. The candidate producers are untouched, andemit_typed_exprandrender_rust_typeare untouched, per the operator ruling.Evidence, by execution.
gunbc compile --entrya probe module importingv2.std.node { Node }.std_content_hash.rscarries thev2_std_nodeuse-line before the change (1 line) and not after (0).claim_executor --required-regen):v1_compiler_emit,emit_rust,infer,trait_derive_emit,gunbc_occurrence_binding_parser_walk, and one claim module. Each is a name that appears in its module only inside a string literal, e.g.AlgebraFieldTemplateandOccurrenceIdinv1_compiler_infer.rs.first_generation_equal=true).gunbc.recurring_failure_modea_string_literal_attests_an_emitted_reference. Rung: mitigatable. Ceiling: structurally guaranteed. Next-rung trigger: use-lines derived from the emitted reference set the renderers return, the capabilityemitted_inline_crate_path_edges_unreturned_stallnames.Second arm, same gate. Over the full
v2.compiler.compileclosure,std_content_hash.rsstill emitted theHashuse-line. Its code carries#[derive(..., std::hash::Hash)], and the tokenizer splits on:, so a segment inside a qualified path attested the bare name.rust_qualified_segments_markedprefixes every segment after::with@, so a marked segment never equals a candidate. A path head stays a token, soParent::Variantstill attestsParent. Seed regen: the next generations drop the remaining re-exports whose names occur only as qualified segments (inemit_rust,infer,infer_resolve,parseandtrait_derive_emit). The seed compiles, and the third generation is a fixed point.Limits, stated. The stripper reads quote characters, so a
'"'char literal would flip its parity. If that happened, it would drop tokens, and missing imports fail loudly at rustc; it cannot silently add a use-line. The whole-seed fixed point is the measured evidence that no such case exists in the seed today.v1 admission. This is v2 self-host work under
gunbc.v1_maintenance_standingv1_seed_standing: the emitted use-lines are the edges that decide whether the emitted compiler partitions into crates. It adds one function to the emitter.dagand one call-site change. The mirror changes are regenerated, not hand-edited.🤖 Generated with Claude Code