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_trait_selection | |
| parent | 8ee4446ee5e1c23bef61b45f74e37db4bad2f424 (diff) | |
| download | rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.tar.gz rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.zip | |
Remove DefId from AssocItemContainer.
Diffstat (limited to 'compiler/rustc_trait_selection')
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index c3abb515b03..219413121d8 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -2714,7 +2714,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { if let Some(ident) = self .tcx .opt_associated_item(trait_item_def_id) - .and_then(|i| self.tcx.opt_item_ident(i.container.id())) + .and_then(|i| self.tcx.opt_item_ident(i.container_id(self.tcx))) { assoc_span.push_span_label(ident.span, "in this trait"); } diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs index 2921ce0ffef..612f5130908 100644 --- a/compiler/rustc_trait_selection/src/traits/object_safety.rs +++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs @@ -690,7 +690,7 @@ fn receiver_is_dispatchable<'tcx>( // U: Trait<Arg1, ..., ArgN> let trait_predicate = { let substs = - InternalSubsts::for_item(tcx, method.container.assert_trait(), |param, _| { + InternalSubsts::for_item(tcx, method.trait_container(tcx).unwrap(), |param, _| { if param.index == 0 { unsized_self_ty.into() } else { diff --git a/compiler/rustc_trait_selection/src/traits/util.rs b/compiler/rustc_trait_selection/src/traits/util.rs index e9bbc25d026..b9259196c48 100644 --- a/compiler/rustc_trait_selection/src/traits/util.rs +++ b/compiler/rustc_trait_selection/src/traits/util.rs @@ -359,7 +359,7 @@ pub fn generator_trait_ref_and_outputs<'tcx>( pub fn impl_item_is_final(tcx: TyCtxt<'_>, assoc_item: &ty::AssocItem) -> bool { assoc_item.defaultness(tcx).is_final() - && tcx.impl_defaultness(assoc_item.container.id()).is_final() + && tcx.impl_defaultness(assoc_item.container_id(tcx)).is_final() } pub enum TupleArgumentsFlag { |
