-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-perfperformance issuesperformance issuesA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionS-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work
Description
A bound like T::Item: Debug
can slow down trait solving a lot because it will currently result in a search through all Debug
impls (this case will be hit), see e.g. #6362.
rust-lang/chalk#589 should solve this, but the changes in rust-lang/chalk#638 should probably also fix it in most cases. At some point, I'd like to remove the above-mentioned unrestricted search case (i.e. return an empty list instead), which would make sure we don't get bad performance at the cost of getting wrong results if we encounter that situation (which we shouldn't).
qwertz19281, timkendrickmw, LouisGariepy and Philipp-M
Metadata
Metadata
Assignees
Labels
A-perfperformance issuesperformance issuesA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionS-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work