about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-04-07 10:14:50 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-04-07 10:14:50 +0000
commitfbe0591c6897216042a201795185bc0c0dac42c1 (patch)
tree1c46316443461e8f1e1e18e5cb59ab15c51d3afb
parent2733c29bb1a385779c1d74dbce96180799e15e56 (diff)
downloadrust-fbe0591c6897216042a201795185bc0c0dac42c1.tar.gz
rust-fbe0591c6897216042a201795185bc0c0dac42c1.zip
Mark `OwnedSlice::{deref, borrow}` as `#[inline]`
-rw-r--r--compiler/rustc_data_structures/src/owned_slice.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/owned_slice.rs b/compiler/rustc_data_structures/src/owned_slice.rs
index c0a3cb07194..048401f66c2 100644
--- a/compiler/rustc_data_structures/src/owned_slice.rs
+++ b/compiler/rustc_data_structures/src/owned_slice.rs
@@ -92,6 +92,7 @@ where
 impl Deref for OwnedSlice {
     type Target = [u8];
 
+    #[inline]
     fn deref(&self) -> &[u8] {
         // Safety:
         // `self.bytes` is valid per the construction in `slice_owned`
@@ -101,6 +102,7 @@ impl Deref for OwnedSlice {
 }
 
 impl Borrow<[u8]> for OwnedSlice {
+    #[inline]
     fn borrow(&self) -> &[u8] {
         self
     }