Skip to content

Commit 45ac720

Browse files
committed
---
yaml --- r: 210418 b: refs/heads/try c: df42976 h: refs/heads/master v: v3
1 parent 12a8965 commit 45ac720

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 4d8d68f80d2fb474188c1c2ee26d6266b4eaa003
5+
refs/heads/try: df42976e4db6565e8693460c34387e515d10ecfd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc/middle/traits/error_reporting.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ pub fn report_projection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
5757
let predicate =
5858
infcx.resolve_type_vars_if_possible(&obligation.predicate);
5959
// The ty_err created by normalize_to_error can end up being unified
60-
// into all obligations - we still have to report an error in that
61-
// case.
60+
// into all obligations: for example, if our obligation is something
61+
// like `$X = <() as Foo<$X>>::Out` and () does not implement Foo<_>,
62+
// then $X will be unified with ty_err, but the error still needs to be
63+
// reported.
6264
if !infcx.tcx.sess.has_errors() || !predicate.references_error() {
6365
span_err!(infcx.tcx.sess, obligation.cause.span, E0271,
6466
"type mismatch resolving `{}`: {}",

0 commit comments

Comments
 (0)