change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
This commit is contained in:
parent
be130b57d4
commit
f29a334c90
59 changed files with 108 additions and 127 deletions
|
@ -266,7 +266,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
|
|||
if let Some(trait_of) = self.tcx.trait_id_of_impl(impl_of)
|
||||
&& self.tcx.has_attr(trait_of, sym::rustc_trivial_field_reads)
|
||||
{
|
||||
let trait_ref = self.tcx.bound_impl_trait_ref(impl_of).unwrap().subst_identity();
|
||||
let trait_ref = self.tcx.impl_trait_ref(impl_of).unwrap().subst_identity();
|
||||
if let ty::Adt(adt_def, _) = trait_ref.self_ty().kind()
|
||||
&& let Some(adt_def_id) = adt_def.did().as_local()
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
|
|||
}
|
||||
Node::ImplItem(impl_item) => {
|
||||
let item = self.tcx.local_parent(impl_item.owner_id.def_id);
|
||||
if self.tcx.bound_impl_trait_ref(item.into()).is_none() {
|
||||
if self.tcx.impl_trait_ref(item).is_none() {
|
||||
//// If it's a type whose items are live, then it's live, too.
|
||||
//// This is done to handle the case where, for example, the static
|
||||
//// method of a private type is used, but the type itself is never
|
||||
|
@ -534,7 +534,7 @@ fn check_item<'tcx>(
|
|||
}
|
||||
}
|
||||
DefKind::Impl => {
|
||||
let of_trait = tcx.bound_impl_trait_ref(id.owner_id.to_def_id());
|
||||
let of_trait = tcx.impl_trait_ref(id.owner_id);
|
||||
|
||||
if of_trait.is_some() {
|
||||
worklist.push(id.owner_id.def_id);
|
||||
|
|
|
@ -593,7 +593,7 @@ impl<'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'tcx> {
|
|||
|
||||
fn visit_impl_item(&mut self, ii: &'tcx hir::ImplItem<'tcx>) {
|
||||
let impl_def_id = self.tcx.hir().get_parent_item(ii.hir_id());
|
||||
if self.tcx.bound_impl_trait_ref(impl_def_id.to_def_id()).is_none() {
|
||||
if self.tcx.impl_trait_ref(impl_def_id).is_none() {
|
||||
self.check_missing_stability(ii.owner_id.def_id, ii.span);
|
||||
self.check_missing_const_stability(ii.owner_id.def_id, ii.span);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue