@@ -205,36 +205,41 @@ pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
205205}
206206
207207#[ 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 {
209210 #[ rustc_diagnostic_item = "noop_method_borrow" ]
210211 fn borrow ( & self ) -> & T {
211212 self
212213 }
213214}
214215
215216#[ 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 {
217219 fn borrow_mut ( & mut self ) -> & mut T {
218220 self
219221 }
220222}
221223
222224#[ 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 {
224227 fn borrow ( & self ) -> & T {
225228 & * * self
226229 }
227230}
228231
229232#[ 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 {
231235 fn borrow ( & self ) -> & T {
232236 & * * self
233237 }
234238}
235239
236240#[ 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 {
238243 fn borrow_mut ( & mut self ) -> & mut T {
239244 & mut * * self
240245 }
0 commit comments