You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use the code snippet down below to reproduce it.
I shrank it to a minimal reproducable version.
It seems that it has something to do with the tuple assignment.
Lint Name
manual_is_multiple_of
Reproducer
I tried this code:
pubfnfoo() -> bool{let(a, b) = (3_u32,5);
a % b == 0// not getting linted}
I expected to see this happen:
getting a lint that it can be replaced with:
pubfnfoo() -> bool{let(a, b) = (3_u32,5);
a.is_multiple_of(b)}
Instead, this happened:
Nothing happend. The lint is not getting fired.
But if i do:
pubfnfoo() -> bool{let a = 3_u32;let b = 5;
a % b == 0// is getting linted}
Activity
Gri-ffin commentedon Nov 21, 2026
@rustbot claim
Gri-ffin commentedon Nov 21, 2026
@rustbot unclaim
llRandom commentedon Nov 23, 2026
@rustbot claim
llRandom commentedon Nov 24, 2026
I have a fix that handles tuple literals:
Other nested bindings are still uncertain, as before. Should any of these be covered too, or left for later?