Error messages in report_use_of_moved_value() should be more intelligent. #7286
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-type-system
Area: Type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Currently it knows how to emit three possible error messages:
But there are several situations in which the hints are wrong -- if the type is completely noncopyable, the phrase "moved by default ([hint])" should just be "noncopyable". And, if the type is a stack closure, I'd like it to emit a hint like "Suggest implicitly borrowing the closure with |args...| closure(args...)".
The text was updated successfully, but these errors were encountered: