Skip to content

Commit af8a4a0

Browse files
committed
Auto merge of #26313 - steveklabnik:fix_str_docs, r=alexcrichton
Because these structures are created by a macro, the doc comments don't quite work: the leading /// isn't stripped. Instead, just use #[doc] so that they render correctly.
2 parents 906ad72 + 759a5d1 commit af8a4a0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/libcore/str/mod.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,10 @@ impl<'a, P: Pattern<'a>> SplitInternal<'a, P> {
638638

639639
generate_pattern_iterators! {
640640
forward:
641-
/// Created with the method `.split()`.
641+
#[doc="Created with the method `.split()`."]
642642
struct Split;
643643
reverse:
644-
/// Created with the method `.rsplit()`.
644+
#[doc="Created with the method `.rsplit()`."]
645645
struct RSplit;
646646
stability:
647647
#[stable(feature = "rust1", since = "1.0.0")]
@@ -652,10 +652,10 @@ generate_pattern_iterators! {
652652

653653
generate_pattern_iterators! {
654654
forward:
655-
/// Created with the method `.split_terminator()`.
655+
#[doc="Created with the method `.split_terminator()`."]
656656
struct SplitTerminator;
657657
reverse:
658-
/// Created with the method `.rsplit_terminator()`.
658+
#[doc="Created with the method `.rsplit_terminator()`."]
659659
struct RSplitTerminator;
660660
stability:
661661
#[stable(feature = "rust1", since = "1.0.0")]
@@ -698,10 +698,10 @@ impl<'a, P: Pattern<'a>> SplitNInternal<'a, P> {
698698

699699
generate_pattern_iterators! {
700700
forward:
701-
/// Created with the method `.splitn()`.
701+
#[doc="Created with the method `.splitn()`."]
702702
struct SplitN;
703703
reverse:
704-
/// Created with the method `.rsplitn()`.
704+
#[doc="Created with the method `.rsplitn()`."]
705705
struct RSplitN;
706706
stability:
707707
#[stable(feature = "rust1", since = "1.0.0")]
@@ -732,10 +732,10 @@ impl<'a, P: Pattern<'a>> MatchIndicesInternal<'a, P> {
732732

733733
generate_pattern_iterators! {
734734
forward:
735-
/// Created with the method `.match_indices()`.
735+
#[doc="Created with the method `.match_indices()`."]
736736
struct MatchIndices;
737737
reverse:
738-
/// Created with the method `.rmatch_indices()`.
738+
#[doc="Created with the method `.rmatch_indices()`."]
739739
struct RMatchIndices;
740740
stability:
741741
#[unstable(feature = "core",
@@ -773,10 +773,10 @@ impl<'a, P: Pattern<'a>> MatchesInternal<'a, P> {
773773

774774
generate_pattern_iterators! {
775775
forward:
776-
/// Created with the method `.matches()`.
776+
#[doc="Created with the method `.matches()`."]
777777
struct Matches;
778778
reverse:
779-
/// Created with the method `.rmatches()`.
779+
#[doc="Created with the method `.rmatches()`."]
780780
struct RMatches;
781781
stability:
782782
#[unstable(feature = "core", reason = "type got recently added")]

0 commit comments

Comments
 (0)