Skip to content

Commit a063e5e

Browse files
authored
Rollup merge of rust-lang#77289 - TimDiekmann:alloc-ref-by-ref, r=Amanieu
Change `AllocRef::by_ref` to take `&self` instead of `&mut self` r? @Amanieu
2 parents c789c5e + c22d896 commit a063e5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)