We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 138aa99 commit 8929535Copy full SHA for 8929535
library/core/src/str/converts.rs
@@ -83,6 +83,7 @@ use super::Utf8Error;
83
/// ```
84
#[stable(feature = "rust1", since = "1.0.0")]
85
#[rustc_const_stable(feature = "const_str_from_utf8_shared", since = "1.63.0")]
86
+#[rustc_allow_const_fn_unstable(str_internals)]
87
pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
88
// FIXME: This should use `?` again, once it's `const`
89
match run_utf8_validation(v) {
0 commit comments