2020-01-19 02:47:01 +01:00
|
|
|
// Test that `by_move_binding @ pat_with_by_ref_bindings` is prevented even with promotion.
|
2020-07-21 09:09:27 +00:00
|
|
|
// Currently this logic exists in THIR match checking as opposed to borrowck.
|
2020-01-19 02:47:01 +01:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
struct U;
|
|
|
|
let a @ ref b = U; //~ ERROR borrow of moved value
|
|
|
|
}
|