Closed
Description
Trying to do a rust internals docs build with compiler-docs = true
in the configuration.
I get this error:
Documenting rustc_data_structures v0.0.0 (file:///Users/manishearth/mozilla/rust/src/librustc_data_structures)
error[E0277]: the trait bound `(): core::iter::Iterator` is not satisfied
--> src/librustc_data_structures/indexed_vec.rs:150:74
|
150 | pub fn drain<'a, R: RangeArgument<usize>>(&'a mut self, range: R) -> impl Iterator<Item=T> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
|
= help: the trait `core::iter::Iterator` is not implemented for `()`
= note: the return type of a function must have a statically known size
error[E0277]: the trait bound `(): core::iter::Iterator` is not satisfied
--> src/librustc_data_structures/indexed_vec.rs:156:36
|
156 | &'a mut self, range: R) -> impl Iterator<Item=(I, T)> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
|
= help: the trait `core::iter::Iterator` is not implemented for `()`
= note: the return type of a function must have a statically known size
error: Compilation failed, aborting rustdoc
error: Could not document `rustc_data_structures`.
Caused by:
process didn't exit successfully: `/Users/manishearth/mozilla/rust/build/bootstrap/debug/rustdoc --crate-name rustc_data_structures src/librustc_data_structures/lib.rs --target x86_64-apple-darwin -o /Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/doc -L dependency=/Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/release/deps -L dependency=/Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/release/deps --extern log=/Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/release/deps/liblog-08c10d216c38a725.rlib --extern serialize=/Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/release/deps/libserialize-af034662b9c25f53.dylib --extern serialize=/Users/manishearth/mozilla/rust/build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/release/deps/libserialize-af034662b9c25f53.rlib` (exit code: 101)
warning: build failed, waiting for other jobs to finish...
error: build failed
That function is returning vec.drain
. The error only happens while running rustdoc, not while compiling.
Metadata
Metadata
Assignees
Labels
No labels