Skip to content

Conversation

phansch
Copy link
Contributor

@phansch phansch commented Apr 28, 2018

@oli-obk oli-obk merged commit 1742229 into rust-lang:master Apr 28, 2018
@phansch phansch deleted the rustup20180427 branch April 28, 2018 11:12
@@ -302,7 +302,7 @@ pub fn implements_trait<'a, 'tcx>(
cx.tcx
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
cx.tcx.infer_ctxt().enter(|infcx| {
traits::SelectionContext::new(&infcx).evaluate_obligation_conservatively(&obligation)
traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)

Choose a reason for hiding this comment

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

Sorry, didn't see this PR earlier but this could just be infcx.predicate_must_hold(...) --- i.e., no need to create a SelectionContext. No functional difference though, and I suppose not much perf difference in practice either, so not a big deal.

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.

3 participants