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 upImplement placement-in protocol for relevant data structures #30172
Comments
This comment has been minimized.
This comment has been minimized.
|
we might consider |
pnkfelix
referenced this issue
Dec 3, 2015
Closed
IndexAssign: overloading the `a[b] = c` expression #1129
apasel422
added
the
A-libs
label
Dec 4, 2015
This comment has been minimized.
This comment has been minimized.
|
@nagisa |
This comment has been minimized.
This comment has been minimized.
|
@apasel422 added to the list. |
steveklabnik
added
the
E-mentor
label
Dec 7, 2015
apasel422
referenced this issue
Feb 16, 2016
Merged
Implement placement-in protocol for `LinkedList` #31696
bors
added a commit
that referenced
this issue
Feb 17, 2016
This comment has been minimized.
This comment has been minimized.
|
Since the LinkedList has been implemented one could use the PR as example when implementing the protocol for other collections. |
This comment has been minimized.
This comment has been minimized.
notmatt
commented
Feb 18, 2016
|
@nagisa this looks like something I'd like to take a swing at; would some initial code in a week (±a weekend) be ok? |
This comment has been minimized.
This comment has been minimized.
|
Sure!
|
This comment has been minimized.
This comment has been minimized.
notmatt
commented
Feb 28, 2016
|
@nagisa quick update: apart from an unexpected shortage of spare time, this is going well. I've mostly been reading/understanding Placer et alia & the LinkedList implmentation. I'm starting with the VecDeque given its broad similarity, but not a lot to show yet. |
alexcrichton
added
T-libs
B-unstable
labels
Mar 8, 2016
apasel422
referenced this issue
Mar 20, 2016
Closed
Implement placement-in protocol for `Vec` #32366
pcwalton
referenced this issue
Aug 8, 2016
Open
`array.push(Foo { ... })` should construct `Foo` in-place #35531
This comment has been minimized.
This comment has been minimized.
|
Wanted for WebRender. |
aturon
added
the
I-nominated
label
Aug 11, 2016
alexcrichton
removed
the
I-nominated
label
Sep 26, 2016
This comment has been minimized.
This comment has been minimized.
|
Dear T-libs members. It has been a
Perhaps the boring, cold and silent cooldown period after Christmas could be a good time to ponder on whatever you think is the best and report after the vacation? I’d like to note that gaining experience with placement-in is literally blocking stabilisation of this feature and since nothing implements the placement-in stuff, nobody is using it, ergo not gaining experience. I feel like adding the placement-in impls, be it in an unstable form, is the easiest way to break this loop that’s putting this awesome feature to the cold hands of Ms. Banshee. |
arielb1
added
the
I-nominated
label
Dec 16, 2016
brson
added
E-help-wanted
P-medium
labels
Dec 19, 2016
This comment has been minimized.
This comment has been minimized.
|
@nagisa Thanks for the reminder! It looks like what happened here is that the libs team discussion was posted to the PR rather than the tracking issue. To recap:
But then it turned out we can't quite get the desired sweet syntax for (In terms of priority, placement continues to not be a high priority as far as I'm aware.) |
bors
added a commit
that referenced
this issue
Jan 7, 2017
alexcrichton
removed
the
I-nominated
label
Jan 9, 2017
martinhath
referenced this issue
Jan 14, 2017
Merged
Implement placement-in protocol for `BinaryHeap` #39062
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Jan 19, 2017
bors
added a commit
that referenced
this issue
Jan 20, 2017
This was referenced Mar 9, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 9, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 10, 2017
alexcrichton
added a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 10, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 10, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 10, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 11, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 11, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 12, 2017
steveklabnik
removed
the
A-libs
label
Mar 24, 2017
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
API issue: reusing Vec's placer type allows violating memory safety (writing to the Vec without allocating space). See issue #44637 |
This comment has been minimized.
This comment has been minimized.
|
(Edited: This ended up in the wrong issue, transporting the comment over to the tracking issue for placement new.) |
This comment has been minimized.
This comment has been minimized.
|
I also wonder whether it is useful to implement placement-in protocol for many wrapper types beside collections, such as |
This comment has been minimized.
This comment has been minimized.
|
Looks like this is headed in the opposite direction now? rust-lang/rfcs#2387 |
This comment has been minimized.
This comment has been minimized.
|
Closing as per removal of placement features in #48333. |
nagisa commentedDec 2, 2015
•
edited
We currently have the unstable new arrow syntax (
<-) for placement-in in nightly with intention to see how people like the syntax/how ergonomic it is/etc. However, it is pretty hard to try the syntax out without having any useful/common data-structures implementing the placement-in protocol and thus it is pretty unlikely for us to collect much feedback on the syntax.The
Placer,PlaceandInPlacetraits should be implemented for following data structures as appropriate:&mut myvec <- value; see this RFC regarding mutable reference) #32366mymap.entry(k) <- value) #40390&mut heap <- value) #39062front_placeandback_place, likeLinkedList) #40389It should also be investigated how viable implementing placement protocol is for other
std::collectionscollections and possibly implementing these as well.Since both placement protocol and placement-in syntax are unstable, there’s no stability hazard.
cc @pnkfelix.
I personally feel this issue has tons of potential to help people get acquainted with rust’s standard library (i.e. is in E-easy land) and would be willing to answer any questions (E-mentor) regarding implementation strategies on IRC or the issue itself.