Skip to content

Enumerate BinOp arms in rust_refusing_int_operator_helper (NFR burn-down) - #12733

Merged
gunbai-bot[bot] merged 1 commit into
mainfrom
session/fierce-cat-462
Sep 30, 2026
Merged

gunbai-bot[bot] merged 1 commit into
mainfrom
session/fierce-cat-462

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Replaces the _ wildcard in extdeps.languages.rust.emit rust_refusing_int_operator_helper with one arm per remaining std.syntax BinOp variant (Eq…NullCoalesce → none). The seed mirror is regenerated locally.

Why this was reverted before, and why it can land now. An NFR burn-down run reported that this enumeration raised the //gunbc/instruments:v2-native-cli emitted-crate warning_count from 0 to 52. Suspected cause: nullary variant patterns emitted as bare identifiers, which Rust binds as catch-all variables. I could not reproduce this on main f006fbe, with the site enumerated:

  • gunbc test //gunbc/instruments:v2-native-cli (local): RUSTFLAGS="-D warnings" … exit_status=0 warning_count=0. The door and refusal controls pass.
  • The emitted helper renders every arm qualified (BinOp::Add => …, …, BinOp::NullCoalesce => std::option::Option::None).
  • A standalone fixture matching all 14 BinOp variants also renders qualified.

The emitter's bare-name fallback (rust_variant_path_opt, Absent arm) is still a writable widening arm. It becomes a refusal in a separate PR, which also files the RFM row.

Regen: claim_executor --regen-round-cost run locally (ulimit -v 24G, -j4, CTRL_BUILD_MODE=local, private CARGO_TARGET_DIR). Round 1 changed extdeps_languages_rust_emit.rs and rebuilt 4 packages. Round 2: rebuild_packages=0. Only the installed mirror is committed.

🤖 Generated with Claude Code

…own; 52-warning report not reproduced)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit ea14422 Sep 30, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/fierce-cat-462 branch September 30, 2026 08:00
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.

0 participants