diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-07-26 14:27:00 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 14:27:00 +0530 |
| commit | ad32667bc8bb6ca96e3591ccc1f4daef4bf67028 (patch) | |
| tree | 32feb61883acec33947a50f21536b8c399a243ec /compiler/rustc_middle/src | |
| parent | 962da8bdcef3c200d6e27550fc83145204cf30ac (diff) | |
| parent | d3492ca85205182e30e9baf06e9b1db08e501f56 (diff) | |
| download | rust-ad32667bc8bb6ca96e3591ccc1f4daef4bf67028.tar.gz rust-ad32667bc8bb6ca96e3591ccc1f4daef4bf67028.zip | |
Rollup merge of #99748 - compiler-errors:better-impl-trait-printing, r=fee1-dead
Use full type name instead of just saying `impl Trait` in "captures lifetime" error I think this is very useful, especially when there's >1 `impl Trait`, and it just means passing around a bit more info that we already have access to.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/infer/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/infer/mod.rs b/compiler/rustc_middle/src/infer/mod.rs index 8b2f9bdfd48..38868c21049 100644 --- a/compiler/rustc_middle/src/infer/mod.rs +++ b/compiler/rustc_middle/src/infer/mod.rs @@ -2,9 +2,8 @@ pub mod canonical; pub mod unify_key; use crate::ty::Region; -use crate::ty::Ty; +use crate::ty::{OpaqueTypeKey, Ty}; use rustc_data_structures::sync::Lrc; -use rustc_hir::def_id::LocalDefId; use rustc_span::Span; /// Requires that `region` must be equal to one of the regions in `choice_regions`. @@ -15,8 +14,9 @@ use rustc_span::Span; /// ``` #[derive(Debug, Clone, HashStable, TypeFoldable, TypeVisitable, Lift)] pub struct MemberConstraint<'tcx> { - /// The `DefId` of the opaque type causing this constraint: used for error reporting. - pub opaque_type_def_id: LocalDefId, + /// The `DefId` and substs of the opaque type causing this constraint. + /// Used for error reporting. + pub key: OpaqueTypeKey<'tcx>, /// The span where the hidden type was instantiated. pub definition_span: Span, |
