Skip to content

Commit 3d99716

Browse files
committed
---
yaml --- r: 224161 b: refs/heads/beta c: 73df224 h: refs/heads/master i: 224159: 3dca388 v: v3
1 parent 7cb4fd8 commit 3d99716

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 1905a498751af69ffe78de8eae0c4e83d562d175
26+
refs/heads/beta: 73df224f0559e31e6d4623978cf25ada9ba1e2d8
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/liballoc/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
test(no_crate_inject))]
7171
#![no_std]
7272

73+
// SNAP d4432b3
74+
#![allow(unused_features)] // until feature(placement_in_syntax) is in snap
7375
#![feature(allocator)]
7476
#![feature(box_syntax)]
7577
#![feature(coerce_unsized)]
@@ -83,6 +85,7 @@
8385
#![feature(nonzero)]
8486
#![feature(optin_builtin_traits)]
8587
#![feature(placement_in_syntax)]
88+
#![feature(placement_new_protocol)]
8689
#![feature(raw)]
8790
#![feature(staged_api)]
8891
#![feature(unboxed_closures)]

branches/beta/src/libcore/ops.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
12851285
/// If evaluating EXPR fails, then the destructor for the
12861286
/// implementation of Place to clean up any intermediate state
12871287
/// (e.g. deallocate box storage, pop a stack, etc).
1288+
#[unstable(feature = "placement_new_protocol")]
12881289
pub trait Place<Data: ?Sized> {
12891290
/// Returns the address where the input value will be written.
12901291
/// Note that the data at this address is generally uninitialized,
@@ -1315,6 +1316,7 @@ pub trait Place<Data: ?Sized> {
13151316
/// Values for types implementing this trait usually are transient
13161317
/// intermediate values (e.g. the return value of `Vec::emplace_back`)
13171318
/// or `Copy`, since the `make_place` method takes `self` by value.
1319+
#[unstable(feature = "placement_new_protocol")]
13181320
pub trait Placer<Data: ?Sized> {
13191321
/// `Place` is the intermedate agent guarding the
13201322
/// uninitialized state for `Data`.
@@ -1325,6 +1327,7 @@ pub trait Placer<Data: ?Sized> {
13251327
}
13261328

13271329
/// Specialization of `Place` trait supporting `in (PLACE) EXPR`.
1330+
#[unstable(feature = "placement_new_protocol")]
13281331
pub trait InPlace<Data: ?Sized>: Place<Data> {
13291332
/// `Owner` is the type of the end value of `in (PLACE) EXPR`
13301333
///
@@ -1361,11 +1364,12 @@ pub trait InPlace<Data: ?Sized>: Place<Data> {
13611364
/// `<T as Boxed>` in turn dictates determines which
13621365
/// implementation of `BoxPlace` to use, namely:
13631366
/// `<<T as Boxed>::Place as BoxPlace>`.
1367+
#[unstable(feature = "placement_new_protocol")]
13641368
pub trait Boxed {
13651369
/// The kind of data that is stored in this kind of box.
13661370
type Data; /* (`Data` unused b/c cannot yet express below bound.) */
13671371
/// The place that will negotiate the storage of the data.
1368-
type Place; /* should be bounded by BoxPlace<Self::Data> */
1372+
type Place: BoxPlace<Self::Data>;
13691373

13701374
/// Converts filled place into final owning value, shifting
13711375
/// deallocation/cleanup responsibilities (if any remain), over to
@@ -1374,6 +1378,7 @@ pub trait Boxed {
13741378
}
13751379

13761380
/// Specialization of `Place` trait supporting `box EXPR`.
1381+
#[unstable(feature = "placement_new_protocol")]
13771382
pub trait BoxPlace<Data: ?Sized> : Place<Data> {
13781383
/// Creates a globally fresh place.
13791384
fn make_place() -> Self;

0 commit comments

Comments
 (0)