about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-29 22:13:37 +0000
committerbors <bors@rust-lang.org>2020-09-29 22:13:37 +0000
commit0d97f7a96877a96015d70ece41ad08bb7af12377 (patch)
tree32e90cec13700c1effb1fb1706686ab0ab4cfbe9
parent381b445ff5751f9f39ec672b623372dff09c276e (diff)
parentc22d896b9b1754b04e1dfbec14f056b374f35b62 (diff)
downloadrust-0d97f7a96877a96015d70ece41ad08bb7af12377.tar.gz
rust-0d97f7a96877a96015d70ece41ad08bb7af12377.zip
Auto merge of #77289 - TimDiekmann:alloc-ref-by-ref, r=Amanieu
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`

r? `@Amanieu`
-rw-r--r--library/core/src/alloc/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs
index f9eb8981bbf..6b14e06e452 100644
--- a/library/core/src/alloc/mod.rs
+++ b/library/core/src/alloc/mod.rs
@@ -337,7 +337,7 @@ pub unsafe trait AllocRef {
     ///
     /// The returned adaptor also implements `AllocRef` and will simply borrow this.
     #[inline(always)]
-    fn by_ref(&mut self) -> &Self {
+    fn by_ref(&self) -> &Self {
         self
     }
 }