diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2021-02-12 22:44:43 +0000 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2021-02-13 19:30:07 +0000 |
| commit | dfee89f75545b4fadc559eee324afc8bb0bdc1be (patch) | |
| tree | 486a81d0f0a7613b0c65f3fac233b4d0ed00bcf3 /compiler/rustc_trait_selection/src | |
| parent | 79f6f11816cbef2bba6f5da6d4a4f0aa10535b88 (diff) | |
| download | rust-dfee89f75545b4fadc559eee324afc8bb0bdc1be.tar.gz rust-dfee89f75545b4fadc559eee324afc8bb0bdc1be.zip | |
Make ProjectionTy::trait_ref truncate substs again
Also make sure that type arguments of associated types are printed in some error messages.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 3233d1e048b..e9aaa652564 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -1589,8 +1589,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> { self.emit_inference_failure_err(body_id, span, a.into(), vec![], ErrorCode::E0282) } ty::PredicateKind::Projection(data) => { - let trait_ref = bound_predicate.rebind(data).to_poly_trait_ref(self.tcx); - let self_ty = trait_ref.skip_binder().self_ty(); + let self_ty = data.projection_ty.self_ty(); let ty = data.ty; if predicate.references_error() { return; |
