File tree 4 files changed +9
-4
lines changed
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ struct RcBox<T: ?Sized> {
283
283
/// [get_mut]: #method.get_mut
284
284
#[ cfg_attr( not( test) , lang = "rc" ) ]
285
285
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
286
+ #[ fundamental]
286
287
pub struct Rc < T : ?Sized > {
287
288
ptr : NonNull < RcBox < T > > ,
288
289
phantom : PhantomData < T > ,
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
200
200
/// [rc_examples]: ../../std/rc/index.html#examples
201
201
#[ cfg_attr( not( test) , lang = "arc" ) ]
202
202
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
203
+ #[ fundamental]
203
204
pub struct Arc < T : ?Sized > {
204
205
ptr : NonNull < ArcInner < T > > ,
205
206
phantom : PhantomData < T > ,
Original file line number Diff line number Diff line change @@ -921,4 +921,7 @@ impl<T: UseSpecializedDecodable> Decodable for T {
921
921
impl < ' a , T : ?Sized + Encodable > UseSpecializedEncodable for & ' a T { }
922
922
impl < T : ?Sized + Encodable > UseSpecializedEncodable for Box < T > { }
923
923
impl < T : Decodable > UseSpecializedDecodable for Box < T > { }
924
-
924
+ impl < T : ?Sized + Encodable > UseSpecializedEncodable for Rc < T > { }
925
+ impl < T : Decodable > UseSpecializedDecodable for Rc < T > { }
926
+ impl < T : ?Sized + Encodable > UseSpecializedEncodable for Arc < T > { }
927
+ impl < T : Decodable > UseSpecializedDecodable for Arc < T > { }
Original file line number Diff line number Diff line change 1
- error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `std::boxed::Box <_>`:
1
+ error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `std::sync::Arc <_>`:
2
2
--> $DIR/issue-41974.rs:17:1
3
3
|
4
4
LL | impl<T> Drop for T where T: A { //~ ERROR E0119
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= note: conflicting implementation in crate `alloc`:
8
- - impl<T> std::ops::Drop for std::boxed::Box <T>
8
+ - impl<T> std::ops::Drop for std::sync::Arc <T>
9
9
where T: ?Sized;
10
- = note: downstream crates may implement trait `A` for type `std::boxed::Box <_>`
10
+ = note: downstream crates may implement trait `A` for type `std::sync::Arc <_>`
11
11
12
12
error[E0120]: the Drop trait may only be implemented on structures
13
13
--> $DIR/issue-41974.rs:17:18
You can’t perform that action at this time.
0 commit comments