mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 15:08:53 +00:00
8 lines
254 B
Rust
8 lines
254 B
Rust
// 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
|
|
}
|