I am looking at this test case run-pass/issue-511:

    fn f<T>(&o: option<T>) { assert o == option::none; }
    fn main() { f::<int>(option::none); }

Is this really supposed to pass? The bug (#511) suggests it is, but I guess the language has migrated some since then. In any case, if it is intended to be legal, what is the meaning of passing a global constant (option::none) by mutable reference?

Also, in that case, we are not fully consistent. For example, this is not permitted:

    fn foo(&i: int) {}
    fn main() { foo(3); }



Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to