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
Since dup duplicates a unique pointer, it shouldn't accept it. Indeed, it correctly rejects the following program, complaining that it uses a moved variable:
First problem was due to not updating the borrow check for moves-based-on-type; that was fixed earlier today. The second problem was due to not handing @ and ~ constructors correctly in mode computation; that was fixed just now.
RalfJung
added a commit
to RalfJung/rust
that referenced
this issue
Jan 19, 2025
Currently, the incoming branch rustc accepts the following program:
Since
dup
duplicates a unique pointer, it shouldn't accept it. Indeed, it correctly rejects the following program, complaining that it uses a moved variable:This makes me think that the problem is somewhere in the code @pcwalton added in #4109, @33c1e47.
Note that the following is also accepted incorrectly:
However, the following is correctly rejected:
The text was updated successfully, but these errors were encountered: