Skip to content

Commit c1c0a1b

Browse files
Rollup merge of rust-lang#130845 - RalfJung:utf8chunk, r=tgross35
Utf8Chunks: add link to Utf8Chunk It is currently surprisingly non-trivial to go from the `utf8_chunks` method to the docs of the `valid`/`invalid` methods used in the example. This should help.
2 parents 805d196 + f560508 commit c1c0a1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/str/lossy.rs

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ impl [u8] {
88
/// Creates an iterator over the contiguous valid UTF-8 ranges of this
99
/// slice, and the non-UTF-8 fragments in between.
1010
///
11+
/// See the [`Utf8Chunk`] type for documenation of the items yielded by this iterator.
12+
///
1113
/// # Examples
1214
///
1315
/// This function formats arbitrary but mostly-UTF-8 bytes into Rust source
@@ -148,6 +150,8 @@ impl fmt::Debug for Debug<'_> {
148150
/// If you want a simple conversion from UTF-8 byte slices to string slices,
149151
/// [`from_utf8`] is easier to use.
150152
///
153+
/// See the [`Utf8Chunk`] type for documenation of the items yielded by this iterator.
154+
///
151155
/// [byteslice]: slice
152156
/// [`from_utf8`]: super::from_utf8
153157
///

0 commit comments

Comments
 (0)