Repository navigation
Native broker 2C/C3: an erased empty-map type argument defers to the target's inference (std_list, −3 broker errors) - #13238
Conversation
rust_empty_map_kv_type_str rendered key and value through render_rust_type with an empty emit info, so a fn-scope generic rendered by its erased inference (std.list duplicated_by_key: rc_empty_map::<String, compile_error!(UNRESOLVED_CompilerError)>). Now through render_rust_arrow_position, as the arrow positions already are. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replaces the generic-scope render, which had no effect: the turbofish type arrives erased from infer (generic record instantiation at an unannotated literal), so no renderer can name it. It now declines to ::<_, _>() as an unbound formal already does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND on substance. This is an honest interim rather than a substitute for 2L: the emitter does not invent or recover T; it declines an erased empty-map turbofish to the same Rust-inference arm already used when the enclosing function’s formals cannot be named. The generated assignment and later map_insert still constrain the type, and rustc refuses if that context is insufficient. The upstream generic-record-instantiation gap remains named in declared_type_conformance_note; once 2L supplies the application, this compiler-error predicate naturally stops firing for the specimen. The real std.list.duplicated_by_key cases establish the generic body and its behavior, not a fixture-only shape. Non-blocking: update the PR body’s lane owner from 2D to 2L. The exact-head witnesses run was still in progress when I submitted this review, so do not queue it until that run succeeds and the #13164 window closes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…xed point) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The failing check is |
…/vivid-lynx-377-map-get-fork
Native broker wave 2C, class C3: the
std_listUNRESOLVED_CompilerErrorand the genericTerased to().What was wrong
In
std.listduplicated_by_key,DuplicatedScan { firsts: empty_map(), .. }is a field typedMap<String, T>. It emittedv1_rt::rc_empty_map::<String, compile_error!("UNRESOLVED_CompilerError")>(). The record was then inferred asDuplicatedScan<()>, which produced E0282 and E0308 (Vector<()>vsVector<T>).Where the boundary is (DESIGN §6b)
The emitted functions do carry
<T>, so this is not lane 1C's "generic fns without ". The turbofish's type also arrives already erased:v1.compiler.inferdoes not bind a generic record's parameter at an unannotated record literal. No renderer can name that type. A first attempt rendered it in the fn's generic scope, measured no change, and was reverted.The infer gap is open and tracked, not absorbed. gentle-dove-36 is routing it to lane 2D (loyal-gull-749), whose in-flight fix "a variant literal of a generic owner takes the expected application" (
infer_record_lit_structural) looks like the same root. When that lands, the erased argument should stop arriving, and this arm stops firing for it.The emitter rule
rust_empty_map_init_expralready defers::<_, _>()to the target's inference when it cannot name a turbofish's formals in the fn's scope. An erased type argument is the same state seen one stage earlier, so it now takes the same arm (type_node_carries_erased_type_argument).This follows the rule in
rust_witness_carrier_from_type_node's note: an erased first source declines so the next authority is consulted, rather than rendering its own refusal. rustc infersTfrom the field's latermap_insert, or refuses loudly if it cannot. Nothing is widened.Control
Shared label
gunbc test //gunbc/instruments:native-emission-controls, casesgeneric_empty_map_turbofish_cases. They call the realstd.list duplicated_by_key:["a","b","a","c","b","a"]must give["a","b"](each repeated key's first element, once, in repeat order);[].One remote dispatch ran the label, regenerated, installed and rebuilt the mirrors, then ran the label again:
label exit=0, both cases held.Broker probe delta
cargo checkerrors went from 144 on main to 141 (−3). Allstd_list.rserrors are gone.The remaining
durable_cas_file_storeerrors are F's and are fixed by #13213. #13202, #13213 and this PR all regeneratev1_compiler_emit_rust.rs: whichever merges later regenerates it rather than text-merging.🤖 Generated with Claude Code