Skip to content

Commit da43676

Browse files
committed
docs: Replace std::iterator with std::iter.
1 parent 702767d commit da43676

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

doc/rust.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ The currently implemented features of the compiler are:
20632063

20642064
* `once_fns` - Onceness guarantees a closure is only executed once. Defining a
20652065
closure as `once` is unlikely to be supported going forward. So
2066-
they are hidden behind this feature until they are to be removed.
2066+
they are hidden behind this feature until they are to be removed.
20672067

20682068
If a feature is promoted to a language feature, then all existing programs will
20692069
start to receive compilation warnings about #[feature] directives which enabled
@@ -2748,11 +2748,10 @@ do k(3) |j| {
27482748

27492749
~~~~ {.ebnf .gram}
27502750
for_expr : "for" pat "in" expr '{' block '}' ;
2751-
~~~~
2751+
~~~~
27522752

2753-
A `for` expression is a syntactic construct for looping
2754-
over elements provided by an implementation of
2755-
`std::iterator::Iterator`.
2753+
A `for` expression is a syntactic construct for looping over elements
2754+
provided by an implementation of `std::iter::Iterator`.
27562755

27572756
An example of a for loop over the contents of a vector:
27582757

doc/tutorial-container.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ heapsort.
6969
## Iteration protocol
7070

7171
The iteration protocol is defined by the `Iterator` trait in the
72-
`std::iterator` module. The minimal implementation of the trait is a `next`
72+
`std::iter` module. The minimal implementation of the trait is a `next`
7373
method, yielding the next element from an iterator object:
7474

7575
~~~

src/libstd/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn check_for_null(v: &[u8], buf: *mut libc::c_char) {
330330

331331
/// External iterator for a CString's bytes.
332332
///
333-
/// Use with the `std::iterator` module.
333+
/// Use with the `std::iter` module.
334334
pub struct CStringIterator<'self> {
335335
priv ptr: *libc::c_char,
336336
priv lifetime: &'self libc::c_char, // FIXME: #5922

src/libstd/str.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ Section: Iterators
352352
*/
353353

354354
/// External iterator for a string's characters.
355-
/// Use with the `std::iterator` module.
355+
/// Use with the `std::iter` module.
356356
#[deriving(Clone)]
357357
pub struct CharIterator<'self> {
358358
/// The slice remaining to be iterated
@@ -397,7 +397,7 @@ impl<'self> DoubleEndedIterator<char> for CharIterator<'self> {
397397
}
398398

399399
/// External iterator for a string's characters and their byte offsets.
400-
/// Use with the `std::iterator` module.
400+
/// Use with the `std::iter` module.
401401
#[deriving(Clone)]
402402
pub struct CharOffsetIterator<'self> {
403403
/// The original string to be iterated
@@ -439,20 +439,20 @@ impl<'self> DoubleEndedIterator<(uint, char)> for CharOffsetIterator<'self> {
439439
}
440440

441441
/// External iterator for a string's characters in reverse order.
442-
/// Use with the `std::iterator` module.
442+
/// Use with the `std::iter` module.
443443
pub type CharRevIterator<'self> = Invert<CharIterator<'self>>;
444444

445445
/// External iterator for a string's characters and their byte offsets in reverse order.
446-
/// Use with the `std::iterator` module.
446+
/// Use with the `std::iter` module.
447447
pub type CharOffsetRevIterator<'self> = Invert<CharOffsetIterator<'self>>;
448448

449449
/// External iterator for a string's bytes.
450-
/// Use with the `std::iterator` module.
450+
/// Use with the `std::iter` module.
451451
pub type ByteIterator<'self> =
452452
Map<'self, &'self u8, u8, vec::VecIterator<'self, u8>>;
453453

454454
/// External iterator for a string's bytes in reverse order.
455-
/// Use with the `std::iterator` module.
455+
/// Use with the `std::iter` module.
456456
pub type ByteRevIterator<'self> = Invert<ByteIterator<'self>>;
457457

458458
/// An iterator over the substrings of a string, separated by `sep`.
@@ -682,7 +682,7 @@ enum NormalizationForm {
682682
}
683683

684684
/// External iterator for a string's normalization's characters.
685-
/// Use with the `std::iterator` module.
685+
/// Use with the `std::iter` module.
686686
#[deriving(Clone)]
687687
struct NormalizationIterator<'self> {
688688
priv kind: NormalizationForm,

0 commit comments

Comments
 (0)