1 #[warn(clippy::mixed_read_write_in_expression)]
7 clippy::blacklisted_name
16 // Example from iss#277
22 // Does it work in weird places?
23 // ...in the base for a struct expression?
28 let base = Foo { a: 4, b: 5 };
36 // ...inside a closure?
44 // ...not across a closure?
46 let b = (y, || y = 1);
48 // && and || evaluate left-to-right.
58 // Make sure we don't get confused by alpha conversion.
65 // No warning if we don't read the variable...
70 // ...if the assignment is in a closure...
77 // ... or the access is under an address.
89 // Limitation: l-values other than simple variables don't trigger
96 // Limitation: you can get away with a read under address-of.
110 async fn issue_6925() {
111 let _ = vec![async { true }.await, async { false }.await];