@@ -2,7 +2,8 @@ use super::Vec;
2
2
use crate :: borrow:: Cow ;
3
3
4
4
#[ stable( feature = "cow_from_vec" , since = "1.8.0" ) ]
5
- impl < ' a , T : Clone > From < & ' a [ T ] > for Cow < ' a , [ T ] > {
5
+ #[ rustc_const_unstable( feature = "const_from" , issue = "143773" ) ]
6
+ impl < ' a , T : Clone > const From < & ' a [ T ] > for Cow < ' a , [ T ] > {
6
7
/// Creates a [`Borrowed`] variant of [`Cow`]
7
8
/// from a slice.
8
9
///
@@ -15,7 +16,8 @@ impl<'a, T: Clone> From<&'a [T]> for Cow<'a, [T]> {
15
16
}
16
17
17
18
#[ stable( feature = "cow_from_array_ref" , since = "1.77.0" ) ]
18
- impl < ' a , T : Clone , const N : usize > From < & ' a [ T ; N ] > for Cow < ' a , [ T ] > {
19
+ #[ rustc_const_unstable( feature = "const_from" , issue = "143773" ) ]
20
+ impl < ' a , T : Clone , const N : usize > const From < & ' a [ T ; N ] > for Cow < ' a , [ T ] > {
19
21
/// Creates a [`Borrowed`] variant of [`Cow`]
20
22
/// from a reference to an array.
21
23
///
@@ -28,7 +30,8 @@ impl<'a, T: Clone, const N: usize> From<&'a [T; N]> for Cow<'a, [T]> {
28
30
}
29
31
30
32
#[ stable( feature = "cow_from_vec" , since = "1.8.0" ) ]
31
- impl < ' a , T : Clone > From < Vec < T > > for Cow < ' a , [ T ] > {
33
+ #[ rustc_const_unstable( feature = "const_from" , issue = "143773" ) ]
34
+ impl < ' a , T : Clone > const From < Vec < T > > for Cow < ' a , [ T ] > {
32
35
/// Creates an [`Owned`] variant of [`Cow`]
33
36
/// from an owned instance of [`Vec`].
34
37
///
@@ -41,7 +44,8 @@ impl<'a, T: Clone> From<Vec<T>> for Cow<'a, [T]> {
41
44
}
42
45
43
46
#[ stable( feature = "cow_from_vec_ref" , since = "1.28.0" ) ]
44
- impl < ' a , T : Clone > From < & ' a Vec < T > > for Cow < ' a , [ T ] > {
47
+ #[ rustc_const_unstable( feature = "const_from" , issue = "143773" ) ]
48
+ impl < ' a , T : Clone > const From < & ' a Vec < T > > for Cow < ' a , [ T ] > {
45
49
/// Creates a [`Borrowed`] variant of [`Cow`]
46
50
/// from a reference to [`Vec`].
47
51
///
0 commit comments