Skip to content

warning for assignment to temporary #4497

Closed
@no111u3

Description

@no111u3

For simple useless code:

    fn main() {
        (0, ).0 = 1;
    }

Compiler not generate any warnings/errors, but clippy generate one warning:

warning: assignment to temporary
 --> src/main.rs:4:5
  |
4 |     (0, ).0 = 1;
  |     ^^^^^^^^^^^
  |

I think this warning need to implement in compiler too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions