Make some trivial functions #[inline(always)]
This commit is contained in:
@@ -160,7 +160,7 @@ pub const unsafe fn unreachable_unchecked() -> ! {
|
||||
/// ```
|
||||
///
|
||||
/// [`thread::yield_now`]: ../../std/thread/fn.yield_now.html
|
||||
#[inline]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "renamed_spin_loop", since = "1.49.0")]
|
||||
pub fn spin_loop() {
|
||||
#[cfg(target_arch = "x86")]
|
||||
@@ -345,6 +345,7 @@ pub const fn black_box<T>(dummy: T) -> T {
|
||||
#[unstable(feature = "hint_must_use", issue = "94745")]
|
||||
#[rustc_const_unstable(feature = "hint_must_use", issue = "94745")]
|
||||
#[must_use] // <-- :)
|
||||
#[inline(always)]
|
||||
pub const fn must_use<T>(value: T) -> T {
|
||||
value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user