-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Currently it knows how to emit three possible error messages:
`%s` moved here because it has type `%s`, which is moved by default (use `copy` to override)
`%s` moved here because it has type `%s`, which is moved by default (use `ref` to override)
`%s` moved into closure environment here because its type is moved by default
(make a copy and capture that instead to override)
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...)".
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.