Assign ops papercut with custom view types

Assign ops on temporaries are misleading and don't always make sense:

string.len() += 1;
// What? Allowing this is nonsense and doesn't do what you'd think

So a rule would be needed that could allow this for view-type temporaries while still excluding other kinds of receivers, like the return value of String::len.

1 Like