File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -914,6 +914,8 @@ impl From<&CStr> for Rc<CStr> {
914
914
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
915
915
impl Default for Arc < CStr > {
916
916
/// Creates an empty CStr inside an Arc
917
+ ///
918
+ /// This may or may not share an allocation with other Arcs.
917
919
#[ inline]
918
920
fn default ( ) -> Self {
919
921
let c_str: & CStr = Default :: default ( ) ;
@@ -925,6 +927,8 @@ impl Default for Arc<CStr> {
925
927
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
926
928
impl Default for Rc < CStr > {
927
929
/// Creates an empty CStr inside an Rc
930
+ ///
931
+ /// This may or may not share an allocation with other Rcs on the same thread.
928
932
#[ inline]
929
933
fn default ( ) -> Self {
930
934
let c_str: & CStr = Default :: default ( ) ;
Original file line number Diff line number Diff line change @@ -2228,6 +2228,8 @@ impl<T: Default> Default for Rc<T> {
2228
2228
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
2229
2229
impl Default for Rc < str > {
2230
2230
/// Creates an empty str inside an Rc
2231
+ ///
2232
+ /// This may or may not share an allocation with other Rcs on the same thread.
2231
2233
#[ inline]
2232
2234
fn default ( ) -> Self {
2233
2235
Rc :: from ( "" )
@@ -2238,6 +2240,8 @@ impl Default for Rc<str> {
2238
2240
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
2239
2241
impl < T > Default for Rc < [ T ] > {
2240
2242
/// Creates an empty `[T]` inside an Rc
2243
+ ///
2244
+ /// This may or may not share an allocation with other Rcs on the same thread.
2241
2245
#[ inline]
2242
2246
fn default ( ) -> Self {
2243
2247
let arr: [ T ; 0 ] = [ ] ;
Original file line number Diff line number Diff line change @@ -3304,6 +3304,8 @@ impl<T: Default> Default for Arc<T> {
3304
3304
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
3305
3305
impl Default for Arc < str > {
3306
3306
/// Creates an empty str inside an Arc
3307
+ ///
3308
+ /// This may or may not share an allocation with other Arcs.
3307
3309
#[ inline]
3308
3310
fn default ( ) -> Self {
3309
3311
Arc :: from ( "" )
@@ -3314,6 +3316,8 @@ impl Default for Arc<str> {
3314
3316
#[ stable( feature = "more_rc_default_impls" , since = "CURRENT_RUSTC_VERSION" ) ]
3315
3317
impl < T > Default for Arc < [ T ] > {
3316
3318
/// Creates an empty `[T]` inside an Arc
3319
+ ///
3320
+ /// This may or may not share an allocation with other Arcs.
3317
3321
#[ inline]
3318
3322
fn default ( ) -> Self {
3319
3323
let arr: [ T ; 0 ] = [ ] ;
You can’t perform that action at this time.
0 commit comments