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
From what I can see, Polonius currently computes move errors for points where an uninitialized (moved) path is accessed, but not for points where a path is assigned (like in the example above).
I prototyped a new rule here: master...utaal:partial-move-errors
The branch is an attempt to compute errors for partial assignments to uninitialized variables, which are currently handled by a separate rustc pass.
As an example, with this branch you get a partial_move_error fact for:
structLin{v:u64}fnmain(){letmut a:Lin = Lin{v:3};take(a);
a.v = 7;// <- this assignment}fntake<V>(_v:V){}
The text was updated successfully, but these errors were encountered:
utaal
changed the title
Move errors: add rule to report partial assignments to moved variables
Move errors: add rule to report partial assignment to moved variables
Jun 30, 2020
From what I can see, Polonius currently computes move errors for points where an uninitialized (moved) path is accessed, but not for points where a path is assigned (like in the example above).
I prototyped a new rule here: master...utaal:partial-move-errors
The branch is an attempt to compute errors for partial assignments to uninitialized variables, which are currently handled by a separate rustc pass.
As an example, with this branch you get a partial_move_error fact for:
cc @lqd @AlbinS (also see the conversation on Zulip, https://rust-lang.zulipchat.com/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/move.20errors.3A.20partial.20assignments.20to.20moved.20variables)
The text was updated successfully, but these errors were encountered: