Skip to content

Commit e06cd9f

Browse files
committed
constify (the unstable) str::as_str
1 parent 4f808ba commit e06cd9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3072,7 +3072,7 @@ impl str {
30723072
/// for example references to `Box<str>` or `Arc<str>`.
30733073
#[inline]
30743074
#[unstable(feature = "str_as_str", issue = "130366")]
3075-
pub fn as_str(&self) -> &str {
3075+
pub const fn as_str(&self) -> &str {
30763076
self
30773077
}
30783078
}

0 commit comments

Comments
 (0)