Skip to content

Commit 3611fb3

Browse files
committed
---
yaml --- r: 166524 b: refs/heads/snap-stage3 c: 0201334 h: refs/heads/master v: v3
1 parent c38a39b commit 3611fb3

File tree

117 files changed

+1610
-1013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1610
-1013
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 18842f89f084c52588fe7cffe07f87bf6e90796a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5b0c8acd69ba3e9e8bc84161f89f716b01e7c523
4+
refs/heads/snap-stage3: 0201334439393bed205c1148bed425b80aab8c22
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
180180
AR="$$(AR_$(1))" \
181181
RANLIB="$$(AR_$(1)) s" \
182182
CPPFLAGS="-I $(S)src/rt/" \
183-
EXTRA_CFLAGS="-g1"
183+
EXTRA_CFLAGS="-g1 -ffunction-sections -fdata-sections"
184184
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
185185

186186
ifeq ($$(CFG_DISABLE_JEMALLOC),)

branches/snap-stage3/src/liballoc/arc.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ pub struct Arc<T> {
117117
_ptr: *mut ArcInner<T>,
118118
}
119119

120+
unsafe impl<T: Sync + Send> Send for Arc<T> { }
121+
unsafe impl<T: Sync + Send> Sync for Arc<T> { }
122+
123+
120124
/// A weak pointer to an `Arc`.
121125
///
122126
/// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles
@@ -129,13 +133,19 @@ pub struct Weak<T> {
129133
_ptr: *mut ArcInner<T>,
130134
}
131135

136+
unsafe impl<T: Sync + Send> Send for Weak<T> { }
137+
unsafe impl<T: Sync + Send> Sync for Weak<T> { }
138+
132139
struct ArcInner<T> {
133140
strong: atomic::AtomicUint,
134141
weak: atomic::AtomicUint,
135142
data: T,
136143
}
137144

138-
impl<T: Sync + Send> Arc<T> {
145+
unsafe impl<T: Sync + Send> Send for ArcInner<T> {}
146+
unsafe impl<T: Sync + Send> Sync for ArcInner<T> {}
147+
148+
impl<T> Arc<T> {
139149
/// Constructs a new `Arc<T>`.
140150
///
141151
/// # Examples
@@ -587,6 +597,7 @@ mod tests {
587597
use std::str::Str;
588598
use std::sync::atomic;
589599
use std::task;
600+
use std::kinds::Send;
590601
use std::vec::Vec;
591602
use super::{Arc, Weak, weak_count, strong_count};
592603
use std::sync::Mutex;

branches/snap-stage3/src/liballoc/boxed.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use core::hash::{mod, Hash};
1919
use core::kinds::Sized;
2020
use core::mem;
2121
use core::option::Option;
22+
use core::ptr::Unique;
2223
use core::raw::TraitObject;
2324
use core::result::Result;
2425
use core::result::Result::{Ok, Err};
@@ -44,7 +45,7 @@ pub static HEAP: () = ();
4445
/// A type that represents a uniquely-owned value.
4546
#[lang = "owned_box"]
4647
#[unstable = "custom allocators will add an additional type parameter (with default)"]
47-
pub struct Box<T>(*mut T);
48+
pub struct Box<T>(Unique<T>);
4849

4950
#[stable]
5051
impl<T: Default> Default for Box<T> {

0 commit comments

Comments
 (0)