Skip to content

Commit af221a2

Browse files
committed
Updates to src/libcore/ops.rs for RFC#1228 (Placement Left Arrow)
Also fixed a minor typo in docs for `core::ops::Place`.
1 parent 302602b commit af221a2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/ops.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {}
27472747
#[unstable(feature = "coerce_unsized", issue = "27732")]
27482748
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
27492749

2750-
/// Both `in (PLACE) EXPR` and `box EXPR` desugar into expressions
2750+
/// Both `PLACE <- EXPR` and `box EXPR` desugar into expressions
27512751
/// that allocate an intermediate "place" that holds uninitialized
27522752
/// state. The desugaring evaluates EXPR, and writes the result at
27532753
/// the address returned by the `pointer` method of this trait.
@@ -2762,7 +2762,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
27622762
/// converting the agent to an instance of the owning pointer, via the
27632763
/// appropriate `finalize` method (see the `InPlace`.
27642764
///
2765-
/// If evaluating EXPR fails, then the destructor for the
2765+
/// If evaluating EXPR fails, then it is up to the destructor for the
27662766
/// implementation of Place to clean up any intermediate state
27672767
/// (e.g. deallocate box storage, pop a stack, etc).
27682768
#[unstable(feature = "placement_new_protocol", issue = "27779")]
@@ -2773,9 +2773,9 @@ pub trait Place<Data: ?Sized> {
27732773
fn pointer(&mut self) -> *mut Data;
27742774
}
27752775

2776-
/// Interface to implementations of `in (PLACE) EXPR`.
2776+
/// Interface to implementations of `PLACE <- EXPR`.
27772777
///
2778-
/// `in (PLACE) EXPR` effectively desugars into:
2778+
/// `PLACE <- EXPR` effectively desugars into:
27792779
///
27802780
/// ```rust,ignore
27812781
/// let p = PLACE;
@@ -2788,7 +2788,7 @@ pub trait Place<Data: ?Sized> {
27882788
/// }
27892789
/// ```
27902790
///
2791-
/// The type of `in (PLACE) EXPR` is derived from the type of `PLACE`;
2791+
/// The type of `PLACE <- EXPR` is derived from the type of `PLACE`;
27922792
/// if the type of `PLACE` is `P`, then the final type of the whole
27932793
/// expression is `P::Place::Owner` (see the `InPlace` and `Boxed`
27942794
/// traits).
@@ -2806,12 +2806,12 @@ pub trait Placer<Data: ?Sized> {
28062806
fn make_place(self) -> Self::Place;
28072807
}
28082808

2809-
/// Specialization of `Place` trait supporting `in (PLACE) EXPR`.
2809+
/// Specialization of `Place` trait supporting `PLACE <- EXPR`.
28102810
#[unstable(feature = "placement_new_protocol", issue = "27779")]
28112811
pub trait InPlace<Data: ?Sized>: Place<Data> {
2812-
/// `Owner` is the type of the end value of `in (PLACE) EXPR`
2812+
/// `Owner` is the type of the end value of `PLACE <- EXPR`
28132813
///
2814-
/// Note that when `in (PLACE) EXPR` is solely used for
2814+
/// Note that when `PLACE <- EXPR` is solely used for
28152815
/// side-effecting an existing data-structure,
28162816
/// e.g. `Vec::emplace_back`, then `Owner` need not carry any
28172817
/// information at all (e.g. it can be the unit type `()` in that

0 commit comments

Comments
 (0)