Skip to content

Commit 54870d3

Browse files
committed
---
yaml --- r: 221055 b: refs/heads/auto c: 73df224 h: refs/heads/master i: 221053: c339c94 221051: 0c01187 221047: 04f3f63 221039: 7107a9b 221023: 9f06007 220991: 8e24e71 220927: bb4990d v: v3
1 parent a1756b1 commit 54870d3

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 1905a498751af69ffe78de8eae0c4e83d562d175
11+
refs/heads/auto: 73df224f0559e31e6d4623978cf25ada9ba1e2d8
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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/auto/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)