@@ -205,36 +205,41 @@ pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
205
205
}
206
206
207
207
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
208
- impl < T : ?Sized > Borrow < T > for T {
208
+ #[ rustc_const_unstable( feature = "const_borrow" , issue = "91522" ) ]
209
+ impl < T : ?Sized > const Borrow < T > for T {
209
210
#[ rustc_diagnostic_item = "noop_method_borrow" ]
210
211
fn borrow ( & self ) -> & T {
211
212
self
212
213
}
213
214
}
214
215
215
216
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
216
- impl < T : ?Sized > BorrowMut < T > for T {
217
+ #[ rustc_const_unstable( feature = "const_borrow" , issue = "91522" ) ]
218
+ impl < T : ?Sized > const BorrowMut < T > for T {
217
219
fn borrow_mut ( & mut self ) -> & mut T {
218
220
self
219
221
}
220
222
}
221
223
222
224
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
223
- impl < T : ?Sized > Borrow < T > for & T {
225
+ #[ rustc_const_unstable( feature = "const_borrow" , issue = "91522" ) ]
226
+ impl < T : ?Sized > const Borrow < T > for & T {
224
227
fn borrow ( & self ) -> & T {
225
228
& * * self
226
229
}
227
230
}
228
231
229
232
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
230
- impl < T : ?Sized > Borrow < T > for & mut T {
233
+ #[ rustc_const_unstable( feature = "const_borrow" , issue = "91522" ) ]
234
+ impl < T : ?Sized > const Borrow < T > for & mut T {
231
235
fn borrow ( & self ) -> & T {
232
236
& * * self
233
237
}
234
238
}
235
239
236
240
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
237
- impl < T : ?Sized > BorrowMut < T > for & mut T {
241
+ #[ rustc_const_unstable( feature = "const_borrow" , issue = "91522" ) ]
242
+ impl < T : ?Sized > const BorrowMut < T > for & mut T {
238
243
fn borrow_mut ( & mut self ) -> & mut T {
239
244
& mut * * self
240
245
}
0 commit comments