blob: 82f16fca65fee6ec25381978db786161f0c941e4 (
plain)
1
2
3
4
5
6
7
|
// Test that `by_move_binding @ pat_with_by_ref_bindings` is prevented even with promotion.
// Currently this logic exists in THIR match checking as opposed to borrowck.
fn main() {
struct U;
let a @ ref b = U; //~ ERROR borrow of moved value
}
|