Skip to content

Commit a390564

Browse files
add default docstrings for String and AtomicBool
Part of rust-lang#36265. These are all the instances of `Default` in this repository that are of the form `impl Default for X`. The default for `i32`, for example, is not of this form. @GuillaumeGomez
1 parent f1f40f8 commit a390564

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: src/libcollections/string.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ impl_eq! { Cow<'a, str>, String }
15671567

15681568
#[stable(feature = "rust1", since = "1.0.0")]
15691569
impl Default for String {
1570+
/// Create an empty `String`.
15701571
#[inline]
15711572
fn default() -> String {
15721573
String::new()

Diff for: src/libcore/sync/atomic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ pub struct AtomicBool {
9595
#[cfg(target_has_atomic = "8")]
9696
#[stable(feature = "rust1", since = "1.0.0")]
9797
impl Default for AtomicBool {
98+
/// Create an `AtomicBool` initialized to `false`.
9899
fn default() -> Self {
99100
Self::new(false)
100101
}

0 commit comments

Comments
 (0)