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
This would require no extensions to the standard library, but would place the
352
+
burden on every user who wants to call resume to guarantee (at the risk of
353
+
memory insafety) that their types were not moved, or that they were moveable.
354
+
This seemed like a worse trade off than adding these APIs.
355
+
356
+
## Relationship to owning-ref & rental
357
+
358
+
Existing crates like owning-ref and rental make some use of "self-referential"
359
+
types. Unlike the generators this RFC is designed to support, their references
360
+
always point into the heap - making it acceptable to move their types around.
361
+
362
+
However, some of this infrastructure is still useful to those crates. In
363
+
particular, the stable deref hierarchy is related to the existing hierarchy in
364
+
the stable_deref crate, which those other crates depend on. By uplifting those
365
+
markers into the standard library, we create a shared, endorsed, and guaranteed
366
+
set of markers for the invariants those libraries care about.
367
+
368
+
In order to be implemented in safe code, those library need additional features
369
+
connecting to "existential" or "generative" lifetimes. These language changes
370
+
are out of scope for this RFC.
307
371
308
372
# Unresolved questions
309
373
[unresolved]: #unresolved-questions
310
374
311
-
- What parts of the design do you expect to resolve through the RFC process before this gets merged?
312
-
- What parts of the design do you expect to resolve through the implementation of this feature before stabilization?
313
-
- What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this RFC?
375
+
The names used in this RFC are all entirely up for debate. Some of the items
376
+
introduced (especially the `Move` trait) have evolved away from their original
377
+
design, making the names a bit of a misnomer (`Move` really means that its safe
378
+
to convert between `Pin<T>` and `&mut T`, for example). We want to make sure we
379
+
have adequate names before stabilizing these APIs.
0 commit comments