@@ -547,14 +547,16 @@ impl<T, E> Result<T, E> {
547547 /// # Examples
548548 ///
549549 /// ```
550+ /// #![feature(is_some_with)]
551+ ///
550552 /// let x: Result<u32, &str> = Ok(2);
551- /// assert_eq!(x.is_ok_with(|x| x > 1), true);
553+ /// assert_eq!(x.is_ok_with(|& x| x > 1), true);
552554 ///
553555 /// let x: Result<u32, &str> = Ok(0);
554- /// assert_eq!(x.is_ok_with(|x| x > 1), false);
556+ /// assert_eq!(x.is_ok_with(|& x| x > 1), false);
555557 ///
556558 /// let x: Result<u32, &str> = Err("hey");
557- /// assert_eq!(x.is_ok_with(|x| x > 1), false);
559+ /// assert_eq!(x.is_ok_with(|& x| x > 1), false);
558560 /// ```
559561 #[ must_use]
560562 #[ inline]
@@ -589,16 +591,17 @@ impl<T, E> Result<T, E> {
589591 /// # Examples
590592 ///
591593 /// ```
594+ /// #![feature(is_some_with)]
592595 /// use std::io::{Error, ErrorKind};
593596 ///
594597 /// let x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, "!"));
595598 /// assert_eq!(x.is_err_with(|x| x.kind() == ErrorKind::NotFound), true);
596599 ///
597600 /// let x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, "!"));
598- /// assert_eq!(x.is_ok_with (|x| x.kind() == ErrorKind::NotFound), false);
601+ /// assert_eq!(x.is_err_with (|x| x.kind() == ErrorKind::NotFound), false);
599602 ///
600603 /// let x: Result<u32, Error> = Ok(123);
601- /// assert_eq!(x.is_ok_with (|x| x.kind() == ErrorKind::NotFound), false);
604+ /// assert_eq!(x.is_err_with (|x| x.kind() == ErrorKind::NotFound), false);
602605 /// ```
603606 #[ must_use]
604607 #[ inline]
0 commit comments