Skip to content

Commit 073fc56

Browse files
committed
Mark fmt::Arguments::as_str() as #[inline(always)].
1 parent 1bbb915 commit 073fc56

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl<'a> Arguments<'a> {
471471
#[stable(feature = "fmt_as_str", since = "1.52.0")]
472472
#[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")]
473473
#[must_use]
474-
#[inline]
474+
#[inline(always)]
475475
pub const fn as_str(&self) -> Option<&'static str> {
476476
if self.num_parts.get() == 1 {
477477
// SAFETY: With num_parts == 1, the `parts` field stores just the string.

library/core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ macro_rules! nonzero_integers {
8787

8888
/// Returns the value as a primitive type.
8989
#[$stability]
90-
#[inline]
90+
#[inline(always)]
9191
#[rustc_const_stable(feature = "const_nonzero_get", since = "1.34.0")]
9292
pub const fn get(self) -> $Int {
9393
self.0

0 commit comments

Comments
 (0)