File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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> {
17261726 }
17271727}
17281728
1729- impl < T : Copy > Option < & mut T > {
1729+ impl < T > Option < & mut T > {
17301730 /// Maps an `Option<&mut T>` to an `Option<T>` by copying the contents of the
17311731 /// option.
17321732 ///
@@ -1742,15 +1742,16 @@ impl<T: Copy> Option<&mut T> {
17421742 #[ must_use = "`self` will be dropped if the result is not used" ]
17431743 #[ stable( feature = "copied" , since = "1.35.0" ) ]
17441744 #[ 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+ {
17461749 match self {
17471750 Some ( & mut t) => Some ( t) ,
17481751 None => None ,
17491752 }
17501753 }
1751- }
17521754
1753- impl < T : Clone > Option < & mut T > {
17541755 /// Maps an `Option<&mut T>` to an `Option<T>` by cloning the contents of the
17551756 /// option.
17561757 ///
You can’t perform that action at this time.
0 commit comments