/// # Examples
///
/// ```
+ /// # #![allow(deprecated)]
/// #![feature(vec_resize_default)]
///
/// let mut vec = vec![1, 2, 3];
/// [`Default`]: ../../std/default/trait.Default.html
/// [`Clone`]: ../../std/clone/trait.Clone.html
#[unstable(feature = "vec_resize_default", issue = "41758")]
+ #[rustc_deprecated(reason = "This is moving towards being removed in favor \
+ of `.resize_with(Default::default)`. If you disagree, please comment \
+ in the tracking issue.", since = "1.33.0")]
pub fn resize_default(&mut self, new_len: usize) {
let len = self.len();
impl_is_zero!(u128, |x| x == 0);
impl_is_zero!(usize, |x| x == 0);
+impl_is_zero!(bool, |x| x == false);
impl_is_zero!(char, |x| x == '\0');
impl_is_zero!(f32, |x: f32| x.to_bits() == 0);
}
#[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Drain<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("Drain")
.field(&self.iter.as_slice())