diff options
| author | Ariel Ben-Yehuda <arielb1@mail.tau.ac.il> | 2016-03-29 19:10:39 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2016-04-05 20:58:58 +0300 |
| commit | 513d9f208cc52ab71e2899db30aaead5c82c1a74 (patch) | |
| tree | abfccb694cac1ccf18e50e4070b809456c54374d | |
| parent | 953c3b5f502437398711ca442be0a10ad575b667 (diff) | |
| download | rust-513d9f208cc52ab71e2899db30aaead5c82c1a74.tar.gz rust-513d9f208cc52ab71e2899db30aaead5c82c1a74.zip | |
remove workaround that prints error messages with TyErr
now that normalize_to_error no longer creates these, it is unnecessary.
| -rw-r--r-- | src/librustc/traits/error_reporting.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index f15b9ee44ce..cbcac7f9aa4 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -90,12 +90,7 @@ pub fn report_projection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, let predicate = infcx.resolve_type_vars_if_possible(&obligation.predicate); - // The TyError created by normalize_to_error can end up being unified - // into all obligations: for example, if our obligation is something - // like `$X = <() as Foo<$X>>::Out` and () does not implement Foo<_>, - // then $X will be unified with TyError, but the error still needs to be - // reported. - if !infcx.tcx.sess.has_errors() || !predicate.references_error() { + if !predicate.references_error() { let mut err = struct_span_err!(infcx.tcx.sess, obligation.cause.span, E0271, "type mismatch resolving `{}`: {}", predicate, |
