File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -522,8 +522,10 @@ impl<T: ?Sized> Option<&T> {
522522 /// # Examples
523523 ///
524524 /// ```
525+ /// #![feature(option_owned)]
526+ ///
525527 /// let s = "string";
526- /// let opt_s: Option<&str> = Some(x );
528+ /// let opt_s: Option<&str> = Some(s );
527529 /// assert_eq!(opt_s, Some("string"));
528530 /// let owned: Option<String> = opt_s.owned();
529531 /// assert_eq!(owned, Some(String::from("string")));
@@ -556,8 +558,10 @@ impl<T: ?Sized> Option<&mut T> {
556558 /// # Examples
557559 ///
558560 /// ```
561+ /// #![feature(option_owned)]
562+ ///
559563 /// let s = "string";
560- /// let opt_s: Option<&str> = Some(x );
564+ /// let opt_s: Option<&str> = Some(s );
561565 /// assert_eq!(opt_s, Some("string"));
562566 /// let owned: Option<String> = opt_s.owned();
563567 /// assert_eq!(owned, Some(String::from("string")));
You can’t perform that action at this time.
0 commit comments