summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0502.rs
blob: 958380ece4565862794ff19b3136bec1cdfb5e17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn bar(x: &mut i32) {}
fn foo(a: &mut i32) {
    let ref y = a;
    bar(a); //~ ERROR E0502
    y.use_ref();
}

fn main() {
}

trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { }  }
impl<T> Fake for T { }