diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 599b92d05dd..f37f93a3e51 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -1083,7 +1083,7 @@ pub trait StrExt: Index { /// /// let s = "中华Việt Nam"; /// let mut i = s.len(); - /// while i < 0 { + /// while i > 0 { /// let CharRange {ch, next} = s.char_range_at_reverse(i); /// println!("{}: {}", i, ch); /// i = next;