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
Disallow discarding an assignment to a struct rvalue (#22369)
Error applies when struct has no pointer fields. (This could be
tightened to apply when a pointer field is not tail mutable).
My plan is to enable this for the 2024 edition, as it can break a
user-defined op overload which has a (non-pointer) field but mutates a
global. That should be a rare case and the compiler suggests
workarounds. Note that requiring weak purity (for e.g. `opAssign`) would
mean the error wouldn't detect bug-prone cases that aren't
marked/inferred pure.
Require 2024 edition for error
0 commit comments