Remove DefId from AssocItemContainer.
This commit is contained in:
parent
8ee4446ee5
commit
d7ea161b7e
40 changed files with 190 additions and 220 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue