Pre-RFC: warning for assignment to temporary

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.

1 Like

Please create an issue at https://github.com/rust-lang/rust-clippy.

Thanks, I do it.