]> git.lizzy.rs Git - rust.git/blob - tests/ui/error-codes/E0502.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.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 { }