X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibcore%2Fstr%2Fmod.rs;h=3c7f1b3688398fd64f904fd55d620de37fbe9e65;hb=54f7b1d455915794ab000448799c5092c57535c1;hp=affa8918884f286332b6a8c98987a58b8768d064;hpb=d5f2d3b1773d70bf3d32b94ad2a2bf3125bf743e;p=rust.git diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index affa8918884..3c7f1b36883 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -115,8 +115,8 @@ impl Utf8Error { /// Returns the index in the given string up to which valid UTF-8 was /// verified. /// - /// Starting at the index provided, but not necessarily at it precisely, an - /// invalid UTF-8 encoding sequence was found. + /// It is the maximum index such that `from_utf8(input[..index])` + /// would return `Some(_)`. #[unstable(feature = "utf8_error", reason = "method just added", issue = "27734")] pub fn valid_up_to(&self) -> usize { self.valid_up_to }