Skip to content

Commit abbd9dc

Browse files
committed
Make iterator struct docs more consistent.
Fixes rust-lang#24008.
1 parent 75051c6 commit abbd9dc

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/libcore/str/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
340340
/// External iterator for a string's bytes.
341341
/// Use with the `std::iter` module.
342342
///
343-
/// Created with `str::bytes`
343+
/// Created with the method `.bytes()`.
344344
#[stable(feature = "rust1", since = "1.0.0")]
345345
#[derive(Clone)]
346346
pub struct Bytes<'a>(Map<slice::Iter<'a, u8>, BytesDeref>);
@@ -635,10 +635,10 @@ impl<'a, P: Pattern<'a>> SplitInternal<'a, P> {
635635

636636
generate_pattern_iterators! {
637637
forward:
638-
/// Return type of `str::split()`
638+
/// Created with the method `.split()`.
639639
struct Split;
640640
reverse:
641-
/// Return type of `str::rsplit()`
641+
/// Created with the method `.rsplit()`.
642642
struct RSplit;
643643
stability:
644644
#[stable(feature = "rust1", since = "1.0.0")]
@@ -649,10 +649,10 @@ generate_pattern_iterators! {
649649

650650
generate_pattern_iterators! {
651651
forward:
652-
/// Return type of `str::split_terminator()`
652+
/// Created with the method `.split_terminator()`.
653653
struct SplitTerminator;
654654
reverse:
655-
/// Return type of `str::rsplit_terminator()`
655+
/// Created with the method `.rsplit_terminator()`.
656656
struct RSplitTerminator;
657657
stability:
658658
#[stable(feature = "rust1", since = "1.0.0")]
@@ -695,10 +695,10 @@ impl<'a, P: Pattern<'a>> SplitNInternal<'a, P> {
695695

696696
generate_pattern_iterators! {
697697
forward:
698-
/// Return type of `str::splitn()`
698+
/// Created with the method `.splitn()`.
699699
struct SplitN;
700700
reverse:
701-
/// Return type of `str::rsplitn()`
701+
/// Created with the method `.rsplitn()`.
702702
struct RSplitN;
703703
stability:
704704
#[stable(feature = "rust1", since = "1.0.0")]
@@ -729,10 +729,10 @@ impl<'a, P: Pattern<'a>> MatchIndicesInternal<'a, P> {
729729

730730
generate_pattern_iterators! {
731731
forward:
732-
/// Return type of `str::match_indices()`
732+
/// Created with the method `.match_indices()`.
733733
struct MatchIndices;
734734
reverse:
735-
/// Return type of `str::rmatch_indices()`
735+
/// Created with the method `.rmatch_indices()`.
736736
struct RMatchIndices;
737737
stability:
738738
#[unstable(feature = "core",
@@ -770,10 +770,10 @@ impl<'a, P: Pattern<'a>> MatchesInternal<'a, P> {
770770

771771
generate_pattern_iterators! {
772772
forward:
773-
/// Return type of `str::matches()`
773+
/// Created with the method `.matches()`.
774774
struct Matches;
775775
reverse:
776-
/// Return type of `str::rmatches()`
776+
/// Created with the method `.rmatches()`.
777777
struct RMatches;
778778
stability:
779779
#[unstable(feature = "core", reason = "type got recently added")]
@@ -782,7 +782,7 @@ generate_pattern_iterators! {
782782
delegate double ended;
783783
}
784784

785-
/// Return type of `str::lines()`
785+
/// Created with the method `.lines()`.
786786
#[stable(feature = "rust1", since = "1.0.0")]
787787
#[derive(Clone)]
788788
pub struct Lines<'a>(SplitTerminator<'a, char>);
@@ -810,7 +810,7 @@ impl<'a> DoubleEndedIterator for Lines<'a> {
810810
}
811811
}
812812

813-
/// Return type of `str::lines_any()`
813+
/// Created with the method `.lines_any()`.
814814
#[stable(feature = "rust1", since = "1.0.0")]
815815
#[derive(Clone)]
816816
pub struct LinesAny<'a>(Map<Lines<'a>, LinesAnyMap>);

0 commit comments

Comments
 (0)