File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1726,7 +1726,7 @@ impl<T> Option<&T> {
1726
1726
}
1727
1727
}
1728
1728
1729
- impl < T : Copy > Option < & mut T > {
1729
+ impl < T > Option < & mut T > {
1730
1730
/// Maps an `Option<&mut T>` to an `Option<T>` by copying the contents of the
1731
1731
/// option.
1732
1732
///
@@ -1742,15 +1742,16 @@ impl<T: Copy> Option<&mut T> {
1742
1742
#[ must_use = "`self` will be dropped if the result is not used" ]
1743
1743
#[ stable( feature = "copied" , since = "1.35.0" ) ]
1744
1744
#[ rustc_const_unstable( feature = "const_option_ext" , issue = "91930" ) ]
1745
- pub const fn copied ( self ) -> Option < T > {
1745
+ pub const fn copied ( self ) -> Option < T >
1746
+ where
1747
+ T : Copy ,
1748
+ {
1746
1749
match self {
1747
1750
Some ( & mut t) => Some ( t) ,
1748
1751
None => None ,
1749
1752
}
1750
1753
}
1751
- }
1752
1754
1753
- impl < T : Clone > Option < & mut T > {
1754
1755
/// Maps an `Option<&mut T>` to an `Option<T>` by cloning the contents of the
1755
1756
/// option.
1756
1757
///
You can’t perform that action at this time.
0 commit comments