-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
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.
LifeIsStrange
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.