rust/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
254 B
Rust
Raw Normal View History

// Test that `by_move_binding @ pat_with_by_ref_bindings` is prevented even with promotion.
2020-07-21 04:09:27 -05:00
// 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
}