]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/borrow.rs
Rollup merge of #83571 - a1phyr:feature_const_slice_first_last, r=dtolnay
[rust.git] / library / core / src / borrow.rs
index a0cdf681f67e177fbbdd554a721fcedf77db9a3e..f28be20aaa1e6309d72be3a403a055a546707c18 100644 (file)
@@ -206,6 +206,7 @@ pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> Borrow<T> for T {
+    #[rustc_diagnostic_item = "noop_method_borrow"]
     fn borrow(&self) -> &T {
         self
     }
@@ -220,7 +221,6 @@ fn borrow_mut(&mut self) -> &mut T {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> Borrow<T> for &T {
-    #[rustc_diagnostic_item = "noop_method_borrow"]
     fn borrow(&self) -> &T {
         &**self
     }