about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-09-28 10:42:29 +0200
committerTim Diekmann <tim.diekmann@3dvision.de>2020-09-28 10:42:29 +0200
commitc22d896b9b1754b04e1dfbec14f056b374f35b62 (patch)
tree525b396e0bcdab8120953fd4d4c7eca4d53c68b3
parent4529af972e55f8f85afaada0ee2dd18ab8653637 (diff)
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`
-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
     }
 }