Skip to content

Commit

Permalink
std: Stabilize utf8_error_error_len feature
Browse files Browse the repository at this point in the history
Stabilizes:

* `Utf8Error::error_len`

Closes #40494
  • Loading branch information
alexcrichton committed Jul 25, 2017
1 parent cbfce40 commit 3fae481
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/liballoc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#![feature(test)]
#![feature(unboxed_closures)]
#![feature(unicode)]
#![feature(utf8_error_error_len)]

extern crate alloc;
extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Utf8Error {
/// that starts at the index given by `valid_up_to()`.
/// Decoding should resume after that sequence
/// (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> {
self.error_len.map(|len| len as usize)
}
Expand Down

0 comments on commit 3fae481

Please sign in to comment.