std: Stabilize utf8_error_error_len feature

Stabilizes:

* `Utf8Error::error_len`

Closes #40494
This commit is contained in:
Alex Crichton
2017-07-20 15:46:46 -07:00
parent cbfce40e1c
commit 3fae48107f
2 changed files with 1 additions and 2 deletions

View File

@@ -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;

View File

@@ -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)
} }