about summary refs log tree commit diff
path: root/src/test/compile-fail/issue-511.rs
blob: 02a3082dc10dd9fa2ba6cd2b82e6d7716500efee (plain)
1
2
3
4
5
6
7
8
9
10
11
extern mod std;
use cmp::Eq;

fn f<T:Eq>(o: &mut Option<T>) {
    assert *o == option::None;
}

fn main() {
    f::<int>(&mut option::None);
    //~^ ERROR illegal borrow: creating mutable alias to static item
}