]> git.proxmox.com Git - rustc.git/blob - tests/ui/error-codes/E0502.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / error-codes / E0502.rs
1 fn bar(x: &mut i32) {}
2 fn foo(a: &mut i32) {
3 let ref y = a;
4 bar(a); //~ ERROR E0502
5 y.use_ref();
6 }
7
8 fn main() {
9 }
10
11 trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } }
12 impl<T> Fake for T { }