Skip to content

Instantly share code, notes, and snippets.

@sbeckeriv
Created December 23, 2015 18:08
Show Gist options
  • Save sbeckeriv/c21c20d9d9e4b64fb8ab to your computer and use it in GitHub Desktop.
Save sbeckeriv/c21c20d9d9e4b64fb8ab to your computer and use it in GitHub Desktop.
$ ~/trash/rust-algorithms/chapter-1/3/max_stack[master*]: cargo build
Compiling max_stack v0.1.0 (file:///Users/becker/trash/rust-algorithms/chapter-1/3/max_stack)
src/stackable.rs:34:1: 41:2 error: the trait `core::iter::Iterator` is not implemented for the type `stackable::MaxStackIterator<T>` [E0277]
src/stackable.rs:34 impl<T> IntoIterator for MaxStack<T> {
src/stackable.rs:35 type Item = T;
src/stackable.rs:36 type IntoIter = MaxStackIterator<T>;
src/stackable.rs:37
src/stackable.rs:38 fn into_iter(self) -> MaxStackIterator<T> {
src/stackable.rs:39 MaxStackIterator::new(self)
...
src/stackable.rs:34:1: 41:2 help: run `rustc --explain E0277` to see a detailed explanation
src/stackable.rs:34:1: 41:2 note: `stackable::MaxStackIterator<T>` is not an iterator; maybe try calling `.iter()` or a similar method
src/stackable.rs:34:1: 41:2 note: required by `core::iter::IntoIterator`
error: aborting due to previous error
Could not compile `max_stack`.
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment