diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-13 00:52:25 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-01 21:38:45 +0200 |
| commit | d7ea161b7e71f6a76868b1566bad31c1ca52824c (patch) | |
| tree | f54e79e0433cf00d8ef7b48dbec3491f94f4c073 /compiler/rustc_middle/src/ty/context.rs | |
| parent | 8ee4446ee5e1c23bef61b45f74e37db4bad2f424 (diff) | |
| download | rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.tar.gz rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.zip | |
Remove DefId from AssocItemContainer.
Diffstat (limited to 'compiler/rustc_middle/src/ty/context.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 541763e294f..0a0f45ce1a0 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -1668,8 +1668,7 @@ impl<'tcx> TyCtxt<'tcx> { // Checks if the bound region is in Impl Item. pub fn is_bound_region_in_impl_item(self, suitable_region_binding_scope: LocalDefId) -> bool { - let container_id = - self.associated_item(suitable_region_binding_scope.to_def_id()).container.id(); + let container_id = self.parent(suitable_region_binding_scope.to_def_id()); if self.impl_trait_ref(container_id).is_some() { // For now, we do not try to target impls of traits. This is // because this message is going to suggest that the user |
