Closed
Description
A programming beginner could write something like
let x = 0;
x + 1;
println!("{}", x);
I would expect to see a warning about this side effect free expression statement in line 2. However, I can imagine that it could be quite hard to determine if such an expression is side effect free. After all, operators for non-standard types could have side effects, too.
Now I don't think some crazy analysis about side-effect-behavior of an expression is useful in this situation. I just thought that some very basic and specialized lints (just for primitive types for example) could be very helpful -- especially for beginners.