about summary refs log tree commit diff
path: root/library/core/src/str/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/str/traits.rs')
-rw-r--r--library/core/src/str/traits.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs
index d0f2b9226bf..1597d1c1fa8 100644
--- a/library/core/src/str/traits.rs
+++ b/library/core/src/str/traits.rs
@@ -825,6 +825,8 @@ unsafe impl const SliceIndex<str> for ops::RangeToInclusive<usize> {
 /// assert!(Point::from_str("(1 2)").is_err());
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
+#[const_trait]
+#[rustc_const_unstable(feature = "const_try", issue = "74935")]
 pub trait FromStr: Sized {
     /// The associated error which can be returned from parsing.
     #[stable(feature = "rust1", since = "1.0.0")]