diff options
| author | bors <bors@rust-lang.org> | 2020-09-29 22:13:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-29 22:13:37 +0000 |
| commit | 0d97f7a96877a96015d70ece41ad08bb7af12377 (patch) | |
| tree | 32e90cec13700c1effb1fb1706686ab0ab4cfbe9 | |
| parent | 381b445ff5751f9f39ec672b623372dff09c276e (diff) | |
| parent | c22d896b9b1754b04e1dfbec14f056b374f35b62 (diff) | |
| download | rust-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.rs | 2 |
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 } } |
