Skip to content

Commit cddc3a4

Browse files
committed
---
yaml --- r: 147951 b: refs/heads/try2 c: b6e5168 h: refs/heads/master i: 147949: ff759fa 147947: ded587b 147943: 871797d 147935: 0373e58 v: v3
1 parent a2706c2 commit cddc3a4

File tree

8 files changed

+1
-101
lines changed

8 files changed

+1
-101
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: e095889e4edaa37ad78faa6394d0ac1d3650d64d
8+
refs/heads/try2: b6e516859adc2eb0638a50677f73691f50ea9aca
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/serialize.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -426,18 +426,6 @@ impl<D:Decoder,T:Decodable<D> + 'static> Decodable<D> for @T {
426426
}
427427
}
428428

429-
impl<S:Encoder,T:Encodable<S>> Encodable<S> for @mut T {
430-
fn encode(&self, s: &mut S) {
431-
(**self).encode(s)
432-
}
433-
}
434-
435-
impl<D:Decoder,T:Decodable<D> + 'static> Decodable<D> for @mut T {
436-
fn decode(d: &mut D) -> @mut T {
437-
@mut Decodable::decode(d)
438-
}
439-
}
440-
441429
impl<'a, S:Encoder,T:Encodable<S>> Encodable<S> for &'a [T] {
442430
fn encode(&self, s: &mut S) {
443431
s.emit_seq(self.len(), |s| {

branches/try2/src/libstd/clone.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ impl<T> Clone for @T {
5858
fn clone(&self) -> @T { *self }
5959
}
6060

61-
impl<T> Clone for @mut T {
62-
/// Return a shallow copy of the managed box.
63-
#[inline]
64-
fn clone(&self) -> @mut T { *self }
65-
}
66-
6761
impl<'a, T> Clone for &'a T {
6862
/// Return a shallow copy of the borrowed pointer.
6963
#[inline]
@@ -168,14 +162,6 @@ impl<T: Freeze + DeepClone + 'static> DeepClone for @T {
168162
fn deep_clone(&self) -> @T { @(**self).deep_clone() }
169163
}
170164

171-
// FIXME: #6525: should also be implemented for `T: Send + DeepClone`
172-
impl<T: Freeze + DeepClone + 'static> DeepClone for @mut T {
173-
/// Return a deep copy of the managed box. The `Freeze` trait is required to prevent performing
174-
/// a deep clone of a potentially cyclical type.
175-
#[inline]
176-
fn deep_clone(&self) -> @mut T { @mut (**self).deep_clone() }
177-
}
178-
179165
macro_rules! deep_clone_impl(
180166
($t:ty) => {
181167
impl DeepClone for $t {
@@ -239,23 +225,6 @@ fn test_managed_clone() {
239225
assert_eq!(a, b);
240226
}
241227

242-
#[test]
243-
fn test_managed_mut_deep_clone() {
244-
let x = @mut 5i;
245-
let y: @mut int = x.deep_clone();
246-
*x = 20;
247-
assert_eq!(*y, 5);
248-
}
249-
250-
#[test]
251-
fn test_managed_mut_clone() {
252-
let a = @mut 5i;
253-
let b: @mut int = a.clone();
254-
assert_eq!(a, b);
255-
*b = 10;
256-
assert_eq!(a, b);
257-
}
258-
259228
#[test]
260229
fn test_borrowed_clone() {
261230
let x = 5i;

branches/try2/src/libstd/default.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ pub trait Default {
1616
fn default() -> Self;
1717
}
1818

19-
impl<T: Default + 'static> Default for @mut T {
20-
fn default() -> @mut T { @mut Default::default() }
21-
}
22-
2319
impl<T: Default + 'static> Default for @T {
2420
fn default() -> @T { @Default::default() }
2521
}

branches/try2/src/libstd/managed.rs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ pub fn ptr_eq<T>(a: @T, b: @T) -> bool {
3131
a_ptr == b_ptr
3232
}
3333

34-
/// Determine if two mutable shared boxes point to the same object
35-
#[inline]
36-
pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool {
37-
let (a_ptr, b_ptr): (*T, *T) = (to_unsafe_ptr(&*a), to_unsafe_ptr(&*b));
38-
a_ptr == b_ptr
39-
}
40-
4134
#[cfg(not(test))]
4235
impl<T:Eq> Eq for @T {
4336
#[inline]
@@ -46,14 +39,6 @@ impl<T:Eq> Eq for @T {
4639
fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) }
4740
}
4841

49-
#[cfg(not(test))]
50-
impl<T:Eq> Eq for @mut T {
51-
#[inline]
52-
fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) }
53-
#[inline]
54-
fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) }
55-
}
56-
5742
#[cfg(not(test))]
5843
impl<T:Ord> Ord for @T {
5944
#[inline]
@@ -66,41 +51,18 @@ impl<T:Ord> Ord for @T {
6651
fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) }
6752
}
6853

69-
#[cfg(not(test))]
70-
impl<T:Ord> Ord for @mut T {
71-
#[inline]
72-
fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) }
73-
#[inline]
74-
fn le(&self, other: &@mut T) -> bool { *(*self) <= *(*other) }
75-
#[inline]
76-
fn ge(&self, other: &@mut T) -> bool { *(*self) >= *(*other) }
77-
#[inline]
78-
fn gt(&self, other: &@mut T) -> bool { *(*self) > *(*other) }
79-
}
80-
8154
#[cfg(not(test))]
8255
impl<T: TotalOrd> TotalOrd for @T {
8356
#[inline]
8457
fn cmp(&self, other: &@T) -> Ordering { (**self).cmp(*other) }
8558
}
8659

87-
#[cfg(not(test))]
88-
impl<T: TotalOrd> TotalOrd for @mut T {
89-
#[inline]
90-
fn cmp(&self, other: &@mut T) -> Ordering { (**self).cmp(*other) }
91-
}
92-
9360
#[cfg(not(test))]
9461
impl<T: TotalEq> TotalEq for @T {
9562
#[inline]
9663
fn equals(&self, other: &@T) -> bool { (**self).equals(*other) }
9764
}
9865

99-
#[cfg(not(test))]
100-
impl<T: TotalEq> TotalEq for @mut T {
101-
#[inline]
102-
fn equals(&self, other: &@mut T) -> bool { (**self).equals(*other) }
103-
}
10466
#[test]
10567
fn test() {
10668
let x = @3;

branches/try2/src/libstd/num/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,11 +1079,6 @@ pub fn pow_with_uint<T:NumCast+One+Zero+Div<T,T>+Mul<T,T>>(radix: uint, pow: uin
10791079
total
10801080
}
10811081

1082-
impl<T: Zero + 'static> Zero for @mut T {
1083-
fn zero() -> @mut T { @mut Zero::zero() }
1084-
fn is_zero(&self) -> bool { (**self).is_zero() }
1085-
}
1086-
10871082
impl<T: Zero + 'static> Zero for @T {
10881083
fn zero() -> @T { @Zero::zero() }
10891084
fn is_zero(&self) -> bool { (**self).is_zero() }

branches/try2/src/libstd/repr.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,13 +655,10 @@ fn test_repr() {
655655
exact_test(&(~"he\u10f3llo"), "~\"he\\u10f3llo\"");
656656

657657
exact_test(&(@10), "@10");
658-
exact_test(&(@mut 10), "@mut 10");
659-
exact_test(&((@mut 10, 2)), "(@mut 10, 2)");
660658
exact_test(&(~10), "~10");
661659
exact_test(&(&10), "&10");
662660
let mut x = 10;
663661
exact_test(&(&mut x), "&mut 10");
664-
exact_test(&(@mut [1, 2]), "@mut [1, 2]");
665662

666663
exact_test(&(0 as *()), "(0x0 as *())");
667664
exact_test(&(0 as *mut ()), "(0x0 as *mut ())");

branches/try2/src/libstd/to_bytes.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,6 @@ impl<A:IterBytes> IterBytes for @A {
319319
}
320320
}
321321

322-
impl<A:IterBytes> IterBytes for @mut A {
323-
#[inline]
324-
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {
325-
(**self).iter_bytes(lsb0, f)
326-
}
327-
}
328-
329322
impl<A:IterBytes> IterBytes for Rc<A> {
330323
#[inline]
331324
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {

0 commit comments

Comments
 (0)