2022-08-31 08:24:45 -05:00
|
|
|
#![warn(clippy::multi_assignments)]
|
|
|
|
fn main() {
|
|
|
|
let (mut a, mut b, mut c, mut d) = ((), (), (), ());
|
|
|
|
a = b = c;
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: assignments don't nest intuitively
|
|
|
|
//~| NOTE: `-D clippy::multi-assignments` implied by `-D warnings`
|
2022-08-31 08:24:45 -05:00
|
|
|
a = b = c = d;
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: assignments don't nest intuitively
|
|
|
|
//~| ERROR: assignments don't nest intuitively
|
2022-08-31 08:24:45 -05:00
|
|
|
a = b = { c };
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: assignments don't nest intuitively
|
2022-08-31 08:24:45 -05:00
|
|
|
a = { b = c };
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: assignments don't nest intuitively
|
2022-08-31 08:24:45 -05:00
|
|
|
a = (b = c);
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: assignments don't nest intuitively
|
2022-08-31 08:24:45 -05:00
|
|
|
}
|