@@ -112,15 +112,15 @@ impl<'self> Condvar<'self> {
112112pub struct ARC < T > { x : UnsafeAtomicRcBox < T > }
113113
114114/// Create an atomically reference counted wrapper.
115- pub fn ARC < T : Const + Owned > ( data : T ) -> ARC < T > {
115+ pub fn ARC < T : Freeze + Owned > ( data : T ) -> ARC < T > {
116116 ARC { x : UnsafeAtomicRcBox :: new ( data) }
117117}
118118
119119/**
120120 * Access the underlying data in an atomically reference counted
121121 * wrapper.
122122 */
123- impl < T : Const +Owned > ARC < T > {
123+ impl < T : Freeze +Owned > ARC < T > {
124124 pub fn get < ' a > ( & ' a self ) -> & ' a T {
125125 unsafe { & * self . x . get_immut ( ) }
126126 }
@@ -133,7 +133,7 @@ impl<T:Const+Owned> ARC<T> {
133133 * object. However, one of the `arc` objects can be sent to another task,
134134 * allowing them to share the underlying data.
135135 */
136- impl < T : Const + Owned > Clone for ARC < T > {
136+ impl < T : Freeze + Owned > Clone for ARC < T > {
137137 fn clone ( & self ) -> ARC < T > {
138138 ARC { x : self . x . clone ( ) }
139139 }
@@ -282,14 +282,14 @@ struct RWARC<T> {
282282}
283283
284284/// Create a reader/writer ARC with the supplied data.
285- pub fn RWARC < T : Const + Owned > ( user_data : T ) -> RWARC < T > {
285+ pub fn RWARC < T : Freeze + Owned > ( user_data : T ) -> RWARC < T > {
286286 rw_arc_with_condvars ( user_data, 1 )
287287}
288288/**
289289 * Create a reader/writer ARC with the supplied data and a specified number
290290 * of condvars (as sync::rwlock_with_condvars).
291291 */
292- pub fn rw_arc_with_condvars < T : Const + Owned > (
292+ pub fn rw_arc_with_condvars < T : Freeze + Owned > (
293293 user_data : T ,
294294 num_condvars : uint ) -> RWARC < T >
295295{
@@ -299,7 +299,7 @@ pub fn rw_arc_with_condvars<T:Const + Owned>(
299299 RWARC { x : UnsafeAtomicRcBox :: new ( data) , }
300300}
301301
302- impl < T : Const + Owned > RWARC < T > {
302+ impl < T : Freeze + Owned > RWARC < T > {
303303 /// Duplicate a rwlock-protected ARC, as arc::clone.
304304 pub fn clone ( & self ) -> RWARC < T > {
305305 RWARC {
@@ -309,7 +309,7 @@ impl<T:Const + Owned> RWARC<T> {
309309
310310}
311311
312- impl < T : Const + Owned > RWARC < T > {
312+ impl < T : Freeze + Owned > RWARC < T > {
313313 /**
314314 * Access the underlying data mutably. Locks the rwlock in write mode;
315315 * other readers and writers will block.
@@ -435,7 +435,7 @@ impl<T:Const + Owned> RWARC<T> {
435435// lock it. This wraps the unsafety, with the justification that the 'lock'
436436// field is never overwritten; only 'failed' and 'data'.
437437#[ doc( hidden) ]
438- fn borrow_rwlock < T : Const + Owned > ( state : * const RWARCInner < T > ) -> * RWlock {
438+ fn borrow_rwlock < T : Freeze + Owned > ( state : * const RWARCInner < T > ) -> * RWlock {
439439 unsafe { cast:: transmute ( & const ( * state) . lock ) }
440440}
441441
@@ -452,7 +452,7 @@ pub struct RWReadMode<'self, T> {
452452 token : sync:: RWlockReadMode < ' self > ,
453453}
454454
455- impl < ' self , T : Const + Owned > RWWriteMode < ' self , T > {
455+ impl < ' self , T : Freeze + Owned > RWWriteMode < ' self , T > {
456456 /// Access the pre-downgrade RWARC in write mode.
457457 pub fn write < U > ( & mut self , blk : & fn ( x : & mut T ) -> U ) -> U {
458458 match * self {
@@ -493,7 +493,7 @@ impl<'self, T:Const + Owned> RWWriteMode<'self, T> {
493493 }
494494}
495495
496- impl < ' self , T : Const + Owned > RWReadMode < ' self , T > {
496+ impl < ' self , T : Freeze + Owned > RWReadMode < ' self , T > {
497497 /// Access the post-downgrade rwlock in read mode.
498498 pub fn read < U > ( & self , blk : & fn ( x : & T ) -> U ) -> U {
499499 match * self {
0 commit comments