diff options
| author | The8472 <git@infinite-source.de> | 2019-11-17 01:32:36 +0100 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2020-09-03 20:59:10 +0200 |
| commit | b90816deb7be23d1884f051d20bf9b1b8883d2e4 (patch) | |
| tree | f7f34f737d0fa5041df93366b925833fc6ea8060 | |
| parent | 232065074d5cbc15065860abe4d7fbc8e765ad1d (diff) | |
| download | rust-b90816deb7be23d1884f051d20bf9b1b8883d2e4.tar.gz rust-b90816deb7be23d1884f051d20bf9b1b8883d2e4.zip | |
remove example that relied on non-public trait
| -rw-r--r-- | library/core/src/iter/adapters/mod.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs index 7149bb1db05..aaf3f690490 100644 --- a/library/core/src/iter/adapters/mod.rs +++ b/library/core/src/iter/adapters/mod.rs @@ -69,10 +69,6 @@ pub unsafe trait SourceIter { /// rely on it not being modified. /// /// Adapters must not rely on exclusive ownership or immutability of the source. - /// For example a peeking adapter could either exploit [`TrustedRandomAccess`] to look ahead - /// or implement this trait, but it cannot do both because a caller could call `next()` or any - /// other mutating method on the source between iteration steps and thus invalidate the peeked - /// values. /// The lack of exclusive ownership also requires that adapters must uphold the source's /// public API even when they have crate- or module-internal access. /// @@ -84,7 +80,6 @@ pub unsafe trait SourceIter { /// access to the underlying storage of an iterator while restricting any statefulness /// and side-effects of the pipeline stages from affecting or relying on that storage. /// - /// [`TrustedRandomAccess`]: trait.TrustedRandomAccess.html /// [`next()`]: trait.Iterator.html#method.next fn as_inner(&mut self) -> &mut Self::Source; } |
