Skip to content

Commit

Permalink
Rollup merge of rust-lang#77289 - TimDiekmann:alloc-ref-by-ref, r=Ama…
Browse files Browse the repository at this point in the history
…nieu

Change `AllocRef::by_ref` to take `&self` instead of `&mut self`

r? @Amanieu
  • Loading branch information
Dylan-DPC authored Sep 28, 2020
2 parents c789c5e + c22d896 commit a063e5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit a063e5e

Please sign in to comment.