Closed
Description
Per https://mail.mozilla.org/pipermail/rust-dev/2013-April/003867.html these are unnecessarily inefficient:
~"foo" == x
x == ~"foo"
More generally, whenever a heap literal (~value
or @value
) appears where a borrow is used, the compiler could warn. I'm not sure if want this to apply to all locals or only some (small ones? temporaries within expressions?).