Skip to content

Conversation

@flodiebold
Copy link
Member

@flodiebold flodiebold commented Apr 11, 2020

This speeds up inference in analysis-stats by ~30% (even more with the recursive solver).

There's a slight difference in inferred types, which I think comes from pre-existing wrong handling of error types in impls, so I think it's fine.

@flodiebold flodiebold requested a review from matklad April 11, 2020 12:50
.flat_map(|m| m.values().flat_map(|v| v.iter().copied()))
}

pub fn lookup_impl_defs_for_trait_and_ty(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need both methods public? If we do, than perhaps make self-ty non optional and make the caller write the match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the latter, how about now?

This speeds up inference in analysis-stats by ~30% (even more with the recursive
solver).
@matklad
Copy link
Contributor

matklad commented Apr 11, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 11, 2020

@bors bors bot merged commit 11d400b into rust-lang:master Apr 11, 2020
@flodiebold flodiebold deleted the trait-impl-index branch April 11, 2020 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants