diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index d8fc1faca3a..7ec99e0368e 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -141,6 +141,7 @@ mod hack { use crate::string::ToString; use crate::vec::Vec; + #[inline] pub fn into_vec(b: Box<[T]>) -> Vec { unsafe { let len = b.len(); diff --git a/src/librustc_query_system/dep_graph/graph.rs b/src/librustc_query_system/dep_graph/graph.rs index 73983e1644c..fa2b51058a3 100644 --- a/src/librustc_query_system/dep_graph/graph.rs +++ b/src/librustc_query_system/dep_graph/graph.rs @@ -1112,6 +1112,7 @@ impl DepNodeColorMap { DepNodeColorMap { values: (0..size).map(|_| AtomicU32::new(COMPRESSED_NONE)).collect() } } + #[inline] fn get(&self, index: SerializedDepNodeIndex) -> Option { match self.values[index].load(Ordering::Acquire) { COMPRESSED_NONE => None, diff --git a/src/librustc_query_system/query/plumbing.rs b/src/librustc_query_system/query/plumbing.rs index b371a914c6f..9da13f23664 100644 --- a/src/librustc_query_system/query/plumbing.rs +++ b/src/librustc_query_system/query/plumbing.rs @@ -51,6 +51,7 @@ pub struct QueryState { } impl QueryState { + #[inline] pub(super) fn get_lookup<'tcx>( &'tcx self, key: &C::Key, diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 1dd942e252f..29e99c0afd2 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -253,6 +253,7 @@ impl LocalKey { /// This function will still `panic!()` if the key is uninitialized and the /// key's initializer panics. #[stable(feature = "thread_local_try_with", since = "1.26.0")] + #[inline] pub fn try_with(&'static self, f: F) -> Result where F: FnOnce(&T) -> R,