Skip to content

Commit 0d97f7a

Browse files
committed
Auto merge of #77289 - TimDiekmann:alloc-ref-by-ref, r=Amanieu
Change `AllocRef::by_ref` to take `&self` instead of `&mut self` r? `@Amanieu`
2 parents 381b445 + c22d896 commit 0d97f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: library/core/src/alloc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ pub unsafe trait AllocRef {
337337
///
338338
/// The returned adaptor also implements `AllocRef` and will simply borrow this.
339339
#[inline(always)]
340-
fn by_ref(&mut self) -> &Self {
340+
fn by_ref(&self) -> &Self {
341341
self
342342
}
343343
}

0 commit comments

Comments
 (0)