1
Fork 0

Suggest ref for some patterns as a fallback

This commit is contained in:
Esteban Küber 2022-12-08 17:14:56 -08:00
parent 4f7c257fd8
commit dd72b1a0df
34 changed files with 476 additions and 63 deletions

View file

@ -0,0 +1,12 @@
// run-rustfix
#![allow(unused_variables)]
fn main() {
struct U;
// A tuple is a "non-reference pattern".
// A `mut` binding pattern resets the binding mode to by-value.
let mut p = (U, U);
let (a, mut b) = &mut p;
//~^ ERROR cannot move out of a mutable reference
}