File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ use super::Utf8Error;
84
84
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
85
85
#[ rustc_const_stable( feature = "const_str_from_utf8_shared" , since = "1.63.0" ) ]
86
86
#[ rustc_allow_const_fn_unstable( str_internals) ]
87
+ #[ rustc_diagnostic_item = "str_from_utf8" ]
87
88
pub const fn from_utf8 ( v : & [ u8 ] ) -> Result < & str , Utf8Error > {
88
89
// FIXME: This should use `?` again, once it's `const`
89
90
match run_utf8_validation ( v) {
@@ -127,6 +128,7 @@ pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
127
128
/// errors that can be returned.
128
129
#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
129
130
#[ rustc_const_unstable( feature = "const_str_from_utf8" , issue = "91006" ) ]
131
+ #[ rustc_diagnostic_item = "str_from_utf8_mut" ]
130
132
pub const fn from_utf8_mut ( v : & mut [ u8 ] ) -> Result < & mut str , Utf8Error > {
131
133
// This should use `?` again, once it's `const`
132
134
match run_utf8_validation ( v) {
You can’t perform that action at this time.
0 commit comments