Last active
August 29, 2015 14:00
-
-
Save Hydrotoast/35905252323bab78d25a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// linked_list.rs:11:25: 11:26 error: expected one of `;`, `}` but found `:` | |
// linked_list.rs:11 ListIterator<T> { data: &self } | |
enum List<T> { | |
Cons(T, ~List<T>), | |
Nil | |
} | |
struct ListIterator<T> { data: &List<T> } | |
impl<T> List<T> { | |
fn iter(~self) -> ListIterator<T> { | |
ListIterator<T> { data: &self } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment