2011-09-22 22:50:12 -07:00
|
|
|
use std;
|
2011-12-13 16:25:51 -08:00
|
|
|
import option;
|
2011-09-22 22:50:12 -07:00
|
|
|
|
2012-01-31 17:05:20 -08:00
|
|
|
fn f<T>(&o: option<T>) {
|
2011-09-22 22:50:12 -07:00
|
|
|
assert o == option::none;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
f::<int>(option::none);
|
2012-05-10 19:58:23 -07:00
|
|
|
//!^ ERROR taking mut reference to static item
|
2012-06-07 13:56:52 -07:00
|
|
|
//!^^ ERROR illegal borrow unless pure: creating mutable alias to aliasable, immutable memory
|
|
|
|
//!^^^ NOTE impure due to access to impure function
|
2011-09-22 22:50:12 -07:00
|
|
|
}
|