File tree 3 files changed +13
-5
lines changed
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,11 @@ impl<B: ?Sized + ToOwned> Cow<'_, B> {
330
330
}
331
331
332
332
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
333
- impl < B : ?Sized + ToOwned > Deref for Cow < ' _ , B > {
333
+ #[ rustc_const_unstable( feature = "const_deref" , issue = "88955" ) ]
334
+ impl < B : ?Sized + ToOwned > const Deref for Cow < ' _ , B >
335
+ where
336
+ B :: Owned : ~const Borrow < B > ,
337
+ {
334
338
type Target = B ;
335
339
336
340
fn deref ( & self ) -> & B {
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ impl<T: ?Sized> ManuallyDrop<T> {
145
145
}
146
146
147
147
#[ stable( feature = "manually_drop" , since = "1.20.0" ) ]
148
- impl < T : ?Sized > Deref for ManuallyDrop < T > {
148
+ #[ rustc_const_unstable( feature = "const_deref" , issue = "88955" ) ]
149
+ impl < T : ?Sized > const Deref for ManuallyDrop < T > {
149
150
type Target = T ;
150
151
#[ inline( always) ]
151
152
fn deref ( & self ) -> & T {
@@ -154,7 +155,8 @@ impl<T: ?Sized> Deref for ManuallyDrop<T> {
154
155
}
155
156
156
157
#[ stable( feature = "manually_drop" , since = "1.20.0" ) ]
157
- impl < T : ?Sized > DerefMut for ManuallyDrop < T > {
158
+ #[ rustc_const_unstable( feature = "const_deref" , issue = "88955" ) ]
159
+ impl < T : ?Sized > const DerefMut for ManuallyDrop < T > {
158
160
#[ inline( always) ]
159
161
fn deref_mut ( & mut self ) -> & mut T {
160
162
& mut self . value
Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ pub trait Deref {
76
76
}
77
77
78
78
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
79
- impl < T : ?Sized > Deref for & T {
79
+ #[ rustc_const_unstable( feature = "const_deref" , issue = "88955" ) ]
80
+ impl < T : ?Sized > const Deref for & T {
80
81
type Target = T ;
81
82
82
83
#[ rustc_diagnostic_item = "noop_method_deref" ]
@@ -89,7 +90,8 @@ impl<T: ?Sized> Deref for &T {
89
90
impl < T : ?Sized > !DerefMut for & T { }
90
91
91
92
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
92
- impl < T : ?Sized > Deref for & mut T {
93
+ #[ rustc_const_unstable( feature = "const_deref" , issue = "88955" ) ]
94
+ impl < T : ?Sized > const Deref for & mut T {
93
95
type Target = T ;
94
96
95
97
fn deref ( & self ) -> & T {
You can’t perform that action at this time.
0 commit comments