1
Fork 0

Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse

remove enum name from ImplSource variants

This is quite a lot cleaner in my opinion.
This commit is contained in:
Jonas Schievink 2020-09-25 19:42:48 +02:00 committed by GitHub
commit e739468f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 104 additions and 110 deletions

View file

@ -1306,7 +1306,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
.at(&ObligationCause::dummy(), self.param_env)
.sup(candidate.xform_self_ty, self_ty);
match self.select_trait_candidate(trait_ref) {
Ok(Some(traits::ImplSource::ImplSourceUserDefined(ref impl_data))) => {
Ok(Some(traits::ImplSource::UserDefined(ref impl_data))) => {
// If only a single impl matches, make the error message point
// to that impl.
ImplSource(impl_data.impl_def_id)