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-06-30 06:23:59 -05:00
|
|
|
//~^ ERROR taking mut reference to static item
|
2012-07-26 10:51:57 -05:00
|
|
|
//~^^ ERROR illegal borrow: creating mutable alias to aliasable, immutable memory
|
2011-09-23 00:50:12 -05:00
|
|
|
}
|