Documentation of what does for each type
This commit is contained in:
parent
1fca1ab0e7
commit
49e77dbf25
32 changed files with 41 additions and 0 deletions
|
@ -718,6 +718,7 @@ impl<T: ?Sized> Clone for Weak<T> {
|
||||||
|
|
||||||
#[stable(feature = "downgraded_weak", since = "1.10.0")]
|
#[stable(feature = "downgraded_weak", since = "1.10.0")]
|
||||||
impl<T> Default for Weak<T> {
|
impl<T> Default for Weak<T> {
|
||||||
|
/// Creates a new `Weak<T>`.
|
||||||
fn default() -> Weak<T> {
|
fn default() -> Weak<T> {
|
||||||
Weak::new()
|
Weak::new()
|
||||||
}
|
}
|
||||||
|
@ -923,6 +924,7 @@ impl<T: ?Sized> fmt::Pointer for Arc<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Default> Default for Arc<T> {
|
impl<T: Default> Default for Arc<T> {
|
||||||
|
/// Creates a new `Arc<T>`, with the `Default` value for T.
|
||||||
fn default() -> Arc<T> {
|
fn default() -> Arc<T> {
|
||||||
Arc::new(Default::default())
|
Arc::new(Default::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,6 +290,7 @@ impl<T: ?Sized> Box<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Default> Default for Box<T> {
|
impl<T: Default> Default for Box<T> {
|
||||||
|
/// Creates a `Box<T>`, with the `Default` value for T.
|
||||||
fn default() -> Box<T> {
|
fn default() -> Box<T> {
|
||||||
box Default::default()
|
box Default::default()
|
||||||
}
|
}
|
||||||
|
|
|
@ -870,6 +870,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
|
||||||
|
|
||||||
#[stable(feature = "downgraded_weak", since = "1.10.0")]
|
#[stable(feature = "downgraded_weak", since = "1.10.0")]
|
||||||
impl<T> Default for Weak<T> {
|
impl<T> Default for Weak<T> {
|
||||||
|
/// Creates a new `Weak<T>`.
|
||||||
fn default() -> Weak<T> {
|
fn default() -> Weak<T> {
|
||||||
Weak::new()
|
Weak::new()
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,7 @@ impl<T: Clone> Clone for BinaryHeap<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Ord> Default for BinaryHeap<T> {
|
impl<T: Ord> Default for BinaryHeap<T> {
|
||||||
|
/// Creates an empty `BinaryHeap<T>`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> BinaryHeap<T> {
|
fn default() -> BinaryHeap<T> {
|
||||||
BinaryHeap::new()
|
BinaryHeap::new()
|
||||||
|
|
|
@ -249,6 +249,7 @@ impl<'a, B: ?Sized> Default for Cow<'a, B>
|
||||||
where B: ToOwned,
|
where B: ToOwned,
|
||||||
<B as ToOwned>::Owned: Default
|
<B as ToOwned>::Owned: Default
|
||||||
{
|
{
|
||||||
|
/// Creates a `Cow<'a, B>` pointer.
|
||||||
fn default() -> Cow<'a, B> {
|
fn default() -> Cow<'a, B> {
|
||||||
Owned(<B as ToOwned>::Owned::default())
|
Owned(<B as ToOwned>::Owned::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1667,6 +1667,7 @@ impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K: Ord, V> Default for BTreeMap<K, V> {
|
impl<K: Ord, V> Default for BTreeMap<K, V> {
|
||||||
|
/// Creates an empty `BTreeMap<K, V>`.
|
||||||
fn default() -> BTreeMap<K, V> {
|
fn default() -> BTreeMap<K, V> {
|
||||||
BTreeMap::new()
|
BTreeMap::new()
|
||||||
}
|
}
|
||||||
|
|
|
@ -674,6 +674,7 @@ impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BTreeSet<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Ord> Default for BTreeSet<T> {
|
impl<T: Ord> Default for BTreeSet<T> {
|
||||||
|
/// Creates a new `BTreeSet<T>`.
|
||||||
fn default() -> BTreeSet<T> {
|
fn default() -> BTreeSet<T> {
|
||||||
BTreeSet::new()
|
BTreeSet::new()
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,7 @@ impl<T> LinkedList<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> Default for LinkedList<T> {
|
impl<T> Default for LinkedList<T> {
|
||||||
|
/// Creates an empty `LinkedList<T>`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
|
|
|
@ -1567,6 +1567,7 @@ impl_eq! { Cow<'a, str>, String }
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Default for String {
|
impl Default for String {
|
||||||
|
/// Creates an empty `String`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> String {
|
fn default() -> String {
|
||||||
String::new()
|
String::new()
|
||||||
|
|
|
@ -1610,6 +1610,7 @@ impl<T> Drop for Vec<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> Default for Vec<T> {
|
impl<T> Default for Vec<T> {
|
||||||
|
/// Creates an empty `Vec<T>`.
|
||||||
fn default() -> Vec<T> {
|
fn default() -> Vec<T> {
|
||||||
Vec::new()
|
Vec::new()
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ impl<T> Drop for VecDeque<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> Default for VecDeque<T> {
|
impl<T> Default for VecDeque<T> {
|
||||||
|
/// Creates a `VecDeque<T>` with a constant initial capacity.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> VecDeque<T> {
|
fn default() -> VecDeque<T> {
|
||||||
VecDeque::new()
|
VecDeque::new()
|
||||||
|
|
|
@ -317,6 +317,7 @@ impl<T:Copy> Clone for Cell<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T:Default + Copy> Default for Cell<T> {
|
impl<T:Default + Copy> Default for Cell<T> {
|
||||||
|
/// Creates a `Cell<T>`, with the `Default` value for T.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> Cell<T> {
|
fn default() -> Cell<T> {
|
||||||
Cell::new(Default::default())
|
Cell::new(Default::default())
|
||||||
|
@ -758,6 +759,7 @@ impl<T: Clone> Clone for RefCell<T> {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T:Default> Default for RefCell<T> {
|
impl<T:Default> Default for RefCell<T> {
|
||||||
|
/// Creates a `RefCell<T>`, with the `Default` value for T.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> RefCell<T> {
|
fn default() -> RefCell<T> {
|
||||||
RefCell::new(Default::default())
|
RefCell::new(Default::default())
|
||||||
|
@ -1139,6 +1141,7 @@ impl<T: ?Sized> UnsafeCell<T> {
|
||||||
|
|
||||||
#[stable(feature = "unsafe_cell_default", since = "1.9.0")]
|
#[stable(feature = "unsafe_cell_default", since = "1.9.0")]
|
||||||
impl<T: Default> Default for UnsafeCell<T> {
|
impl<T: Default> Default for UnsafeCell<T> {
|
||||||
|
/// Creates an `UnsafeCell`, with the `Default` value for T.
|
||||||
fn default() -> UnsafeCell<T> {
|
fn default() -> UnsafeCell<T> {
|
||||||
UnsafeCell::new(Default::default())
|
UnsafeCell::new(Default::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,7 @@ impl<S: Sip> Clone for Hasher<S> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Sip> Default for Hasher<S> {
|
impl<S: Sip> Default for Hasher<S> {
|
||||||
|
/// Creates a `Hasher<S>` with the two initial keys set to 0.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> Hasher<S> {
|
fn default() -> Hasher<S> {
|
||||||
Hasher::new_with_keys(0, 0)
|
Hasher::new_with_keys(0, 0)
|
||||||
|
|
|
@ -698,6 +698,7 @@ fn expect_failed(msg: &str) -> ! {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> Default for Option<T> {
|
impl<T> Default for Option<T> {
|
||||||
|
/// Creates an instance of None.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> Option<T> { None }
|
fn default() -> Option<T> { None }
|
||||||
}
|
}
|
||||||
|
|
|
@ -755,11 +755,13 @@ impl<T> ops::IndexMut<ops::RangeToInclusive<usize>> for [T] {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<'a, T> Default for &'a [T] {
|
impl<'a, T> Default for &'a [T] {
|
||||||
|
/// Creates an empty Slice.
|
||||||
fn default() -> &'a [T] { &[] }
|
fn default() -> &'a [T] { &[] }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "mut_slice_default", since = "1.5.0")]
|
#[stable(feature = "mut_slice_default", since = "1.5.0")]
|
||||||
impl<'a, T> Default for &'a mut [T] {
|
impl<'a, T> Default for &'a mut [T] {
|
||||||
|
/// Creates a mutable empty Slice.
|
||||||
fn default() -> &'a mut [T] { &mut [] }
|
fn default() -> &'a mut [T] { &mut [] }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1987,5 +1987,6 @@ impl AsRef<[u8]> for str {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<'a> Default for &'a str {
|
impl<'a> Default for &'a str {
|
||||||
|
/// Creates an empty str
|
||||||
fn default() -> &'a str { "" }
|
fn default() -> &'a str { "" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ pub struct AtomicBool {
|
||||||
#[cfg(target_has_atomic = "8")]
|
#[cfg(target_has_atomic = "8")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Default for AtomicBool {
|
impl Default for AtomicBool {
|
||||||
|
/// Creates an `AtomicBool` initialised as false.
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(false)
|
Self::new(false)
|
||||||
}
|
}
|
||||||
|
@ -117,6 +118,7 @@ pub struct AtomicPtr<T> {
|
||||||
#[cfg(target_has_atomic = "ptr")]
|
#[cfg(target_has_atomic = "ptr")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> Default for AtomicPtr<T> {
|
impl<T> Default for AtomicPtr<T> {
|
||||||
|
/// Creates an `AtomicPtr<T>` with an initial mutable null pointer.
|
||||||
fn default() -> AtomicPtr<T> {
|
fn default() -> AtomicPtr<T> {
|
||||||
AtomicPtr::new(::ptr::null_mut())
|
AtomicPtr::new(::ptr::null_mut())
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ struct MyHasher {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for MyHasher {
|
impl Default for MyHasher {
|
||||||
|
/// Constructs a `MyHasher` with initial value zero.
|
||||||
fn default() -> MyHasher {
|
fn default() -> MyHasher {
|
||||||
MyHasher { hash: 0 }
|
MyHasher { hash: 0 }
|
||||||
}
|
}
|
||||||
|
@ -90,6 +91,7 @@ impl Hasher for CustomHasher {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CustomHasher {
|
impl Default for CustomHasher {
|
||||||
|
/// Constructs a `CustomHasher` with initial value zero.
|
||||||
fn default() -> CustomHasher {
|
fn default() -> CustomHasher {
|
||||||
CustomHasher { output: 0 }
|
CustomHasher { output: 0 }
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ impl<R: Rng + Default> Reseeder<R> for ReseedWithDefault {
|
||||||
}
|
}
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Default for ReseedWithDefault {
|
impl Default for ReseedWithDefault {
|
||||||
|
/// Creates an instance of `ReseedWithDefault`.
|
||||||
fn default() -> ReseedWithDefault {
|
fn default() -> ReseedWithDefault {
|
||||||
ReseedWithDefault
|
ReseedWithDefault
|
||||||
}
|
}
|
||||||
|
@ -137,6 +138,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl Default for Counter {
|
impl Default for Counter {
|
||||||
|
/// Constructs a `Counter` with initial value zero.
|
||||||
fn default() -> Counter {
|
fn default() -> Counter {
|
||||||
Counter { i: 0 }
|
Counter { i: 0 }
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ pub enum ErrorOutputType {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ErrorOutputType {
|
impl Default for ErrorOutputType {
|
||||||
|
/// Creates an `HumanReadble`, initialised with `ColorConfig` enum type `Auto`.
|
||||||
fn default() -> ErrorOutputType {
|
fn default() -> ErrorOutputType {
|
||||||
ErrorOutputType::HumanReadable(ColorConfig::Auto)
|
ErrorOutputType::HumanReadable(ColorConfig::Auto)
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ pub struct TargetDataLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TargetDataLayout {
|
impl Default for TargetDataLayout {
|
||||||
|
/// Creates an instance of `TargetDataLayout`.
|
||||||
fn default() -> TargetDataLayout {
|
fn default() -> TargetDataLayout {
|
||||||
TargetDataLayout {
|
TargetDataLayout {
|
||||||
endian: Endian::Big,
|
endian: Endian::Big,
|
||||||
|
|
|
@ -35,6 +35,7 @@ pub fn FnvHashSet<V: Hash + Eq>() -> FnvHashSet<V> {
|
||||||
pub struct FnvHasher(u64);
|
pub struct FnvHasher(u64);
|
||||||
|
|
||||||
impl Default for FnvHasher {
|
impl Default for FnvHasher {
|
||||||
|
/// Creates a `FnvHasher`, with a 64-bit hex initial value.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> FnvHasher {
|
fn default() -> FnvHasher {
|
||||||
FnvHasher(0xcbf29ce484222325)
|
FnvHasher(0xcbf29ce484222325)
|
||||||
|
|
|
@ -109,6 +109,7 @@ enum SingleImports<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SingleImports<'a> {
|
impl<'a> Default for SingleImports<'a> {
|
||||||
|
/// Creates a `SingleImports<'a>` of None type.
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SingleImports::None
|
SingleImports::None
|
||||||
}
|
}
|
||||||
|
|
|
@ -1218,6 +1218,7 @@ impl<K, V, S> Default for HashMap<K, V, S>
|
||||||
where K: Eq + Hash,
|
where K: Eq + Hash,
|
||||||
S: BuildHasher + Default,
|
S: BuildHasher + Default,
|
||||||
{
|
{
|
||||||
|
/// Creates a `HashMap<K, V, S>`, with initial `Default` hasher.
|
||||||
fn default() -> HashMap<K, V, S> {
|
fn default() -> HashMap<K, V, S> {
|
||||||
HashMap::with_hasher(Default::default())
|
HashMap::with_hasher(Default::default())
|
||||||
}
|
}
|
||||||
|
@ -2026,6 +2027,7 @@ impl Hasher for DefaultHasher {
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Default for RandomState {
|
impl Default for RandomState {
|
||||||
|
/// Constructs a new `RandomState`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> RandomState {
|
fn default() -> RandomState {
|
||||||
RandomState::new()
|
RandomState::new()
|
||||||
|
|
|
@ -665,6 +665,7 @@ impl<T, S> Default for HashSet<T, S>
|
||||||
where T: Eq + Hash,
|
where T: Eq + Hash,
|
||||||
S: BuildHasher + Default,
|
S: BuildHasher + Default,
|
||||||
{
|
{
|
||||||
|
/// Creates a `HashSet<T, S>` with initial `Default` hasher.
|
||||||
fn default() -> HashSet<T, S> {
|
fn default() -> HashSet<T, S> {
|
||||||
HashSet::with_hasher(Default::default())
|
HashSet::with_hasher(Default::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,6 +339,7 @@ impl<'a> Default for &'a CStr {
|
||||||
|
|
||||||
#[stable(feature = "cstr_default", since = "1.10.0")]
|
#[stable(feature = "cstr_default", since = "1.10.0")]
|
||||||
impl Default for CString {
|
impl Default for CString {
|
||||||
|
/// Creates a new `CString`, by calling the `Default` of `CStr`, and then owns it.
|
||||||
fn default() -> CString {
|
fn default() -> CString {
|
||||||
let a: &CStr = Default::default();
|
let a: &CStr = Default::default();
|
||||||
a.to_owned()
|
a.to_owned()
|
||||||
|
|
|
@ -170,6 +170,7 @@ impl ops::Deref for OsString {
|
||||||
|
|
||||||
#[stable(feature = "osstring_default", since = "1.9.0")]
|
#[stable(feature = "osstring_default", since = "1.9.0")]
|
||||||
impl Default for OsString {
|
impl Default for OsString {
|
||||||
|
/// Constructs an empty `OsString`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> OsString {
|
fn default() -> OsString {
|
||||||
OsString::new()
|
OsString::new()
|
||||||
|
@ -342,6 +343,7 @@ impl OsStr {
|
||||||
|
|
||||||
#[stable(feature = "osstring_default", since = "1.9.0")]
|
#[stable(feature = "osstring_default", since = "1.9.0")]
|
||||||
impl<'a> Default for &'a OsStr {
|
impl<'a> Default for &'a OsStr {
|
||||||
|
/// Creates an empty `OsStr`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn default() -> &'a OsStr {
|
fn default() -> &'a OsStr {
|
||||||
OsStr::new("")
|
OsStr::new("")
|
||||||
|
|
|
@ -241,6 +241,7 @@ impl Condvar {
|
||||||
|
|
||||||
#[stable(feature = "condvar_default", since = "1.9.0")]
|
#[stable(feature = "condvar_default", since = "1.9.0")]
|
||||||
impl Default for Condvar {
|
impl Default for Condvar {
|
||||||
|
/// Creates a `Condvar` which is ready to be waited on and notified.
|
||||||
fn default() -> Condvar {
|
fn default() -> Condvar {
|
||||||
Condvar::new()
|
Condvar::new()
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,6 +287,7 @@ impl<T: ?Sized> Drop for Mutex<T> {
|
||||||
|
|
||||||
#[stable(feature = "mutex_default", since = "1.9.0")]
|
#[stable(feature = "mutex_default", since = "1.9.0")]
|
||||||
impl<T: ?Sized + Default> Default for Mutex<T> {
|
impl<T: ?Sized + Default> Default for Mutex<T> {
|
||||||
|
/// Creates a `Mutex<T>`, with the `Default` value for T.
|
||||||
fn default() -> Mutex<T> {
|
fn default() -> Mutex<T> {
|
||||||
Mutex::new(Default::default())
|
Mutex::new(Default::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,6 +311,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for RwLock<T> {
|
||||||
|
|
||||||
#[stable(feature = "rw_lock_default", since = "1.9.0")]
|
#[stable(feature = "rw_lock_default", since = "1.9.0")]
|
||||||
impl<T: Default> Default for RwLock<T> {
|
impl<T: Default> Default for RwLock<T> {
|
||||||
|
/// Creates a new `RwLock<T>`, with the `Default` value for T.
|
||||||
fn default() -> RwLock<T> {
|
fn default() -> RwLock<T> {
|
||||||
RwLock::new(Default::default())
|
RwLock::new(Default::default())
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,6 +362,7 @@ impl Generics {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Generics {
|
impl Default for Generics {
|
||||||
|
/// Creates an instance of `Generics`.
|
||||||
fn default() -> Generics {
|
fn default() -> Generics {
|
||||||
Generics {
|
Generics {
|
||||||
lifetimes: Vec::new(),
|
lifetimes: Vec::new(),
|
||||||
|
|
|
@ -154,6 +154,7 @@ impl<T> P<[T]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Default for P<[T]> {
|
impl<T> Default for P<[T]> {
|
||||||
|
/// Creates a new `P`, with the `Default` value for T.
|
||||||
fn default() -> P<[T]> {
|
fn default() -> P<[T]> {
|
||||||
P::new()
|
P::new()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue