RS.CLIPPY.TEMPORARY_ASSIGNMENT

Assignments to temporaries

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: temporary_assignment. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for construction of a structure or tuple just to assign a value in it.

Why is this bad?

Readability. If the structure is only created to be updated, why not write the structure you want in the first place?

Example

(0, 0).0 = 1