Skip to content

rust: drop(writeln!(..)) discards errors that unused_result_ok cannot see #13317

Closed

Description

@TrapsterDK

Where

  • drop(writeln!(..)) and drop(write!(..)) discard write errors where clippy::unused_result_ok and clippy::map_err_ignore cannot see them: 28 sites outside cli/cli/src/main.rs.
  • deploy/private/src/cloudflare.rs (17), cli/plan/src/slots.rs:1523,1553,1589,1612, cli/process/src/groups.rs, tools/testing/process_probe/src/main.rs, deploy/private/release/tests/*_consumer_test.rs.
  • cli/adopt/src/version.rs:107 drops a whole Result from write_version_pins.

Fix

  • Route stderr diagnostics through dx_output::write_stderr (added under rust: stop discarding errors in cli/cli and deny unused_result_ok #13147). Propagate or log every other dropped Result with context.
  • Then add a source check under //tools/ci that rejects drop(write!, drop(writeln! and let _ = <expr>.ok() in shipped Rust, so these discards cannot come back once the lints are denied.

Activity

  1. added
    P2
    on Nov 18, 2026
  2. added a commit that references this issue on Nov 18, 2026
    a4ed7ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions