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