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 upUse ManuallyDrop #62
Comments
bluss
added
breaking-change
enhancement
labels
Jul 30, 2017
This comment has been minimized.
This comment has been minimized.
|
Consider using version_check which is small enough to be worth it(?) |
This comment has been minimized.
This comment has been minimized.
|
This can only get the version at runtime – do you want to add a build script? |
This comment has been minimized.
This comment has been minimized.
|
Yep, exactly. Example https://github.com/bluss/debugit/blob/master/build.rs (this one is checking nightly and not the version..) |
This comment has been minimized.
This comment has been minimized.
|
We can handle this without breaks, as long as the minimum rust version is reasonable (not 1.2). However, the question of uninit data inside manuallydrop is unresolved, so we can't really start to use it without including other workarounds too. |
bluss
removed
the
breaking-change
label
Aug 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Looks like f33c4e4 snuck in ManuallyDrop if the Is there anything left to do, besides version detection, before it can entirely replace nodrop? |
This comment has been minimized.
This comment has been minimized.
|
sigh, that was not intended :( |
This comment has been minimized.
This comment has been minimized.
|
It's fine to use ManuallyDrop for use_union. What remains for arrayvec 1.0 is to answer the question about uninitialized data in ManuallyDrop. There was some disagreement in #rustc. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for pointing out that it snuck in, by the way. It was obviously not intended to sneak in. |
This comment has been minimized.
This comment has been minimized.
|
Can you link to the discussion about uninit data in |
This comment has been minimized.
This comment has been minimized.
|
The discussion is here: https://botbot.me/mozilla/rustc/2017-08-24/?msg=90238011&page=3 There are different opinions. I don't think specific people are wrong here, but my collected impression was that there is no consensus on the safety of uninitialized in ManuallyDrop |
This comment has been minimized.
This comment has been minimized.
|
Your idea of making a union |
This comment has been minimized.
This comment has been minimized.
|
Current wip is #76 |
bluss commentedJul 30, 2017
ManuallyDrop is stable in Rust 1.20 (not yet released).
This is the official nodrop that arrayvec has been waiting a long time for; it's likely that we will use Rust 1.20 as the new required version from this point.