Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmem::swap doesn't work with Objects #6
Comments
This comment has been minimized.
This comment has been minimized.
|
The ideal fix for this would be to make NSObjects not |
This comment has been minimized.
This comment has been minimized.
|
If rust-lang/rfcs#709 were accepted, this could be resolved by marking NSObjects as |
SSheldon
referenced this issue
Jan 31, 2015
Closed
mem::swap can mess up a Block's memory representation #8
This comment has been minimized.
This comment has been minimized.
|
The unsized types RFC was postponed as rust-lang/rfcs#813. |
SSheldon
changed the title
mem::swap doesn't work with NSObjects
mem::swap doesn't work with Objects
Mar 23, 2015
This comment has been minimized.
This comment has been minimized.
|
If rust-lang/rfcs#1861 is accepted, we could fix this by making Object an opaque extern type. |
This comment has been minimized.
This comment has been minimized.
|
The extern types RFC was accepted and implemented! Stabilization tracked in rust-lang/rust#43467. |
This comment has been minimized.
This comment has been minimized.
nox
commented
Dec 11, 2017
|
Getting mutable references to void types is undefined behaviour to begin with, will file an issue. |
SSheldon commentedSep 3, 2014
For example, the following code:
Expected output:
Actual output:
We cannot have the expected output happen, because an NSObject's memory address cannot change after it has been constructed.