summaryrefslogtreecommitdiffstats
path: root/library/core/src/convert/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /library/core/src/convert/mod.rs
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/core/src/convert/mod.rs')
-rw-r--r--library/core/src/convert/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs
index 805354be0..5888e2960 100644
--- a/library/core/src/convert/mod.rs
+++ b/library/core/src/convert/mod.rs
@@ -722,6 +722,7 @@ where
///
/// That is, this conversion is whatever the implementation of
/// <code>[From]&lt;T&gt; for U</code> chooses to do.
+ #[inline]
fn into(self) -> U {
U::from(self)
}
@@ -763,6 +764,7 @@ where
{
type Error = U::Error;
+ #[inline]
fn try_into(self) -> Result<U, U::Error> {
U::try_from(self)
}
@@ -778,6 +780,7 @@ where
{
type Error = Infallible;
+ #[inline]
fn try_from(value: U) -> Result<Self, Self::Error> {
Ok(U::into(value))
}