Skip to content

Commit 1dd31a7

Browse files
committed
---
yaml --- r: 208132 b: refs/heads/snap-stage3 c: df42976 h: refs/heads/master v: v3
1 parent dbe5123 commit 1dd31a7

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4d8d68f80d2fb474188c1c2ee26d6266b4eaa003
4+
refs/heads/snap-stage3: df42976e4db6565e8693460c34387e515d10ecfd
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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)