std: Stabilize utf8_error_error_len feature
Stabilizes: * `Utf8Error::error_len` Closes #40494
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(unicode)]
|
#![feature(unicode)]
|
||||||
#![feature(utf8_error_error_len)]
|
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ impl Utf8Error {
|
|||||||
/// that starts at the index given by `valid_up_to()`.
|
/// that starts at the index given by `valid_up_to()`.
|
||||||
/// Decoding should resume after that sequence
|
/// Decoding should resume after that sequence
|
||||||
/// (after inserting a U+FFFD REPLACEMENT CHARACTER) in case of lossy decoding.
|
/// (after inserting a U+FFFD REPLACEMENT CHARACTER) in case of lossy decoding.
|
||||||
#[unstable(feature = "utf8_error_error_len", reason ="new", issue = "40494")]
|
#[stable(feature = "utf8_error_error_len", since = "1.20.0")]
|
||||||
pub fn error_len(&self) -> Option<usize> {
|
pub fn error_len(&self) -> Option<usize> {
|
||||||
self.error_len.map(|len| len as usize)
|
self.error_len.map(|len| len as usize)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user