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-06-30 12:23:59 +01:00
|
|
|
//~^ ERROR taking mut reference to static item
|
|
|
|
//~^^ 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
|
|
|
}
|