@@ -1857,6 +1857,7 @@ impl<T> Option<&T> {
1857
1857
/// let copied = opt_x.copied();
1858
1858
/// assert_eq!(copied, Some(12));
1859
1859
/// ```
1860
+ #[ inline]
1860
1861
#[ must_use = "`self` will be dropped if the result is not used" ]
1861
1862
#[ stable( feature = "copied" , since = "1.35.0" ) ]
1862
1863
#[ rustc_const_unstable( feature = "const_option" , issue = "67441" ) ]
@@ -1884,6 +1885,7 @@ impl<T> Option<&T> {
1884
1885
/// let cloned = opt_x.cloned();
1885
1886
/// assert_eq!(cloned, Some(12));
1886
1887
/// ```
1888
+ #[ inline]
1887
1889
#[ must_use = "`self` will be dropped if the result is not used" ]
1888
1890
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1889
1891
pub fn cloned ( self ) -> Option < T >
@@ -1910,6 +1912,7 @@ impl<T> Option<&mut T> {
1910
1912
/// let copied = opt_x.copied();
1911
1913
/// assert_eq!(copied, Some(12));
1912
1914
/// ```
1915
+ #[ inline]
1913
1916
#[ must_use = "`self` will be dropped if the result is not used" ]
1914
1917
#[ stable( feature = "copied" , since = "1.35.0" ) ]
1915
1918
#[ rustc_const_unstable( feature = "const_option_ext" , issue = "91930" ) ]
@@ -1935,6 +1938,7 @@ impl<T> Option<&mut T> {
1935
1938
/// let cloned = opt_x.cloned();
1936
1939
/// assert_eq!(cloned, Some(12));
1937
1940
/// ```
1941
+ #[ inline]
1938
1942
#[ must_use = "`self` will be dropped if the result is not used" ]
1939
1943
#[ stable( since = "1.26.0" , feature = "option_ref_mut_cloned" ) ]
1940
1944
pub fn cloned ( self ) -> Option < T >
0 commit comments