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 upDocument heap allocation location guarantee #32383
Conversation
rust-highfive
assigned
steveklabnik
Mar 20, 2016
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/lang, is this a guarantee we actually want to make? |
This comment has been minimized.
This comment has been minimized.
|
We rely on moving |
This comment has been minimized.
This comment has been minimized.
|
std can assume things about implementation details that external libraries can't/shouldn't, because changes to those details can be accompanied by changes to the places that rely on them. That said, I would think that this is a guarantee we want to make, it seems to me like the only downside is that it would stop an implementation using a moving GC for (cc @rust-lang/libs too.) |
This comment has been minimized.
This comment has been minimized.
|
cc https://internals.rust-lang.org/t/zero-sized-fn-types-should-we-change-behavior-of-transmute/3253/2 some more discussion on this |
huonw
added
I-nominated
T-libs
labels
Mar 21, 2016
This comment has been minimized.
This comment has been minimized.
|
I can see that opinion is leaning in favour, but a couple of motivating examples just for completeness:
|
This comment has been minimized.
This comment has been minimized.
I would say "that ship has sailed", except I don't think that such a ship was ever constructed, let alone given a port to dock at... |
This comment has been minimized.
This comment has been minimized.
|
I think we can not -- and should not -- change the fact that |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this during triage yesterday and the conclusion was to merge this for now. We probably want to in the long run take a more principled approach to defining these sorts of guarantees (for example doing them all at once), but this seems like it'd be clearly true in any situation so seems fine to merge. Thanks @aidanhs! |
alexcrichton
removed
I-nominated
T-libs
labels
Mar 24, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors: rollup |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 26, 2016
bors
added a commit
that referenced
this pull request
Mar 26, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 26, 2016
bors
added a commit
that referenced
this pull request
Mar 26, 2016
bors
merged commit bb43f58
into
rust-lang:master
Mar 26, 2016
1 check passed
This comment has been minimized.
This comment has been minimized.
|
Thanks all! |
aidanhs commentedMar 20, 2016
https://botbot.me/mozilla/rust/2016-02-22/?msg=60657619&page=18
r? @steveklabnik