about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-23 00:07:57 +0800
committerkennytm <kennytm@gmail.com>2018-12-23 02:12:20 +0800
commit5e727a43cb800d330cbbc6b9935963f1c1082bfc (patch)
tree4c31a122eebeb85497f77efcff063b188ceef710 /src/librustc_data_structures
parent9b2331d2ca3c5348922211f309198af465fa23ff (diff)
parent4f30a24e42137149373311f20525ac52cff44d94 (diff)
downloadrust-5e727a43cb800d330cbbc6b9935963f1c1082bfc.tar.gz
rust-5e727a43cb800d330cbbc6b9935963f1c1082bfc.zip
Rollup merge of #57034 - Zoxc:query-perf8, r=michaelwoerister
Inline tweaks

r? @michaelwoerister
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 9e29b2798d8..066e1739841 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -112,12 +112,14 @@ pub struct OnDrop<F: Fn()>(pub F);
 impl<F: Fn()> OnDrop<F> {
       /// Forgets the function which prevents it from running.
       /// Ensure that the function owns no memory, otherwise it will be leaked.
+      #[inline]
       pub fn disable(self) {
             std::mem::forget(self);
       }
 }
 
 impl<F: Fn()> Drop for OnDrop<F> {
+      #[inline]
       fn drop(&mut self) {
             (self.0)();
       }