]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / pattern / bindings-after-at / borrowck-pat-by-move-and-ref-inverse-promotion.rs
1 // Test that `by_move_binding @ pat_with_by_ref_bindings` is prevented even with promotion.
2 // Currently this logic exists in THIR match checking as opposed to borrowck.
3
4 #![feature(bindings_after_at)]
5
6 fn main() {
7 struct U;
8 let a @ ref b = U; //~ ERROR borrow of moved value
9 }