1
Fork 0

Rename some compare_method functions

This commit is contained in:
Michael Goulet 2022-12-24 21:12:38 +00:00
parent 7e4f4660eb
commit 6161758b6d
6 changed files with 10 additions and 10 deletions

View file

@ -2,7 +2,7 @@ use crate::check::intrinsicck::InlineAsmCtxt;
use crate::errors::LinkageType;
use super::compare_method::check_type_bounds;
use super::compare_method::{compare_impl_method, compare_ty_impl};
use super::compare_method::{compare_impl_method, compare_impl_ty};
use super::*;
use rustc_attr as attr;
use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan};
@ -774,7 +774,7 @@ fn check_impl_items_against_trait<'tcx>(
let impl_item_full = tcx.hir().impl_item(impl_item.id);
match impl_item_full.kind {
hir::ImplItemKind::Const(..) => {
let _ = tcx.compare_assoc_const_impl_item_with_trait_item((
let _ = tcx.compare_impl_const((
impl_item.id.owner_id.def_id,
ty_impl_item.trait_item_def_id.unwrap(),
));
@ -791,7 +791,7 @@ fn check_impl_items_against_trait<'tcx>(
}
hir::ImplItemKind::Type(impl_ty) => {
let opt_trait_span = tcx.hir().span_if_local(ty_trait_item.def_id);
compare_ty_impl(
compare_impl_ty(
tcx,
&ty_impl_item,
impl_ty.span,

View file

@ -1516,8 +1516,8 @@ fn compare_generic_param_kinds<'tcx>(
Ok(())
}
/// Use `tcx.compare_assoc_const_impl_item_with_trait_item` instead
pub(crate) fn raw_compare_const_impl(
/// Use `tcx.compare_impl_const` instead
pub(crate) fn compare_impl_const_raw(
tcx: TyCtxt<'_>,
(impl_const_item_def, trait_const_item_def): (LocalDefId, DefId),
) -> Result<(), ErrorGuaranteed> {
@ -1623,7 +1623,7 @@ pub(crate) fn raw_compare_const_impl(
Ok(())
}
pub(crate) fn compare_ty_impl<'tcx>(
pub(crate) fn compare_impl_ty<'tcx>(
tcx: TyCtxt<'tcx>,
impl_ty: &ty::AssocItem,
impl_ty_span: Span,

View file

@ -104,7 +104,7 @@ pub fn provide(providers: &mut Providers) {
check_mod_item_types,
region_scope_tree,
collect_trait_impl_trait_tys,
compare_assoc_const_impl_item_with_trait_item: compare_method::raw_compare_const_impl,
compare_impl_const: compare_method::compare_impl_const_raw,
..*providers
};
}