File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -902,16 +902,8 @@ impl<T> From<T> for Arc<T> {
902
902
}
903
903
}
904
904
905
- #[ stable( feature = "rust1" , since = "1.6.0" ) ]
906
- impl < T > From < Box < T > > for Arc < T > {
907
- fn from ( t : Box < T > ) -> Self {
908
- Arc :: new ( * t)
909
- }
910
- }
911
-
912
905
#[ cfg( test) ]
913
906
mod tests {
914
- use std:: boxed:: Box ;
915
907
use std:: clone:: Clone ;
916
908
use std:: sync:: mpsc:: channel;
917
909
use std:: mem:: drop;
@@ -1161,13 +1153,6 @@ mod tests {
1161
1153
let foo_arc = Arc :: from ( foo) ;
1162
1154
assert ! ( 123 == * foo_arc) ;
1163
1155
}
1164
-
1165
- #[ test]
1166
- fn test_from_box ( ) {
1167
- let foo_box = Box :: new ( 123 ) ;
1168
- let foo_arc = Arc :: from ( foo_box) ;
1169
- assert ! ( 123 == * foo_arc) ;
1170
- }
1171
1156
}
1172
1157
1173
1158
impl < T : ?Sized > borrow:: Borrow < T > for Arc < T > {
Original file line number Diff line number Diff line change @@ -706,13 +706,6 @@ impl<T> From<T> for Rc<T> {
706
706
}
707
707
}
708
708
709
- #[ stable( feature = "rust1" , since = "1.6.0" ) ]
710
- impl < T > From < Box < T > > for Rc < T > {
711
- fn from ( t : Box < T > ) -> Self {
712
- Rc :: new ( * t)
713
- }
714
- }
715
-
716
709
/// A weak version of `Rc<T>`.
717
710
///
718
711
/// Weak references do not count when determining if the inner value should be
@@ -1128,13 +1121,6 @@ mod tests {
1128
1121
let foo_rc = Rc :: from ( foo) ;
1129
1122
assert ! ( 123 == * foo_rc) ;
1130
1123
}
1131
-
1132
- #[ test]
1133
- fn test_from_box ( ) {
1134
- let foo_box = Box :: new ( 123 ) ;
1135
- let foo_rc = Rc :: from ( foo_box) ;
1136
- assert ! ( 123 == * foo_rc) ;
1137
- }
1138
1124
}
1139
1125
1140
1126
impl < T : ?Sized > borrow:: Borrow < T > for Rc < T > {
You can’t perform that action at this time.
0 commit comments