summary refs log tree commit diff
path: root/src/test/compile-fail/issue-511.rs
blob: 9dea2443187c151ceaaf2a56c9ef289c4b839295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std;
import option;

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

fn main() {
    f::<int>(option::none);
    //~^ 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
}