rust/src/test/run-pass/ret-none.rs
Marijn Haverbeke f6491bb426 Update stdlib, compiler, and tests to new kind system
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.

Issue #1177
2011-11-18 12:49:01 +01:00

8 lines
105 B
Rust

tag option<T> { none; some(T); }
fn f<copy T>() -> option<T> { ret none; }
fn main() { f::<int>(); }