diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-07-02 02:54:21 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-07-02 02:54:21 -0400 |
commit | e620daf3b1a40ae825c625bc4328fb7d2b3ee8b6 (patch) | |
tree | faa469408ee78623eaa8d2720dcbb36096788ca1 /examples/19_list-error.rs | |
download | intro-to-rust-yapc-na-2014-e620daf3b1a40ae825c625bc4328fb7d2b3ee8b6.tar.gz intro-to-rust-yapc-na-2014-e620daf3b1a40ae825c625bc4328fb7d2b3ee8b6.zip |
Diffstat (limited to 'examples/19_list-error.rs')
-rw-r--r-- | examples/19_list-error.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/19_list-error.rs b/examples/19_list-error.rs new file mode 100644 index 0000000..836e346 --- /dev/null +++ b/examples/19_list-error.rs @@ -0,0 +1,12 @@ +extern crate debug; + +enum List<T> { + Cons(T, List<T>), + Nil +} + +fn main () { + let l = Cons(1, Cons(2, Cons(4, Nil))); + println!("{:?}", l); +} + |