Do not store visibility in *ItemRef.
This commit is contained in:
parent
5ecc8ad846
commit
d7795d302a
16 changed files with 49 additions and 70 deletions
|
@ -906,7 +906,7 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
|
|||
full_impl_span: Span,
|
||||
impl_id: LocalDefId,
|
||||
impl_trait_ref: ty::TraitRef<'tcx>,
|
||||
impl_item_refs: &[hir::ImplItemRef<'_>],
|
||||
impl_item_refs: &[hir::ImplItemRef],
|
||||
) {
|
||||
// If the trait reference itself is erroneous (so the compilation is going
|
||||
// to fail), skip checking the items here -- the `impl_item` table in `tcx`
|
||||
|
|
|
@ -401,7 +401,7 @@ impl InherentCollect<'tcx> {
|
|||
lang: &str,
|
||||
ty: &str,
|
||||
span: Span,
|
||||
assoc_items: &[hir::ImplItemRef<'_>],
|
||||
assoc_items: &[hir::ImplItemRef],
|
||||
) {
|
||||
match (lang_def_id, lang_def_id2) {
|
||||
(Some(lang_def_id), _) if lang_def_id == impl_def_id.to_def_id() => {
|
||||
|
|
|
@ -97,7 +97,7 @@ impl ItemLikeVisitor<'tcx> for ImplWfCheck<'tcx> {
|
|||
fn enforce_impl_params_are_constrained(
|
||||
tcx: TyCtxt<'_>,
|
||||
impl_def_id: LocalDefId,
|
||||
impl_item_refs: &[hir::ImplItemRef<'_>],
|
||||
impl_item_refs: &[hir::ImplItemRef],
|
||||
) {
|
||||
// Every lifetime used in an associated type must be constrained.
|
||||
let impl_self_ty = tcx.type_of(impl_def_id);
|
||||
|
@ -228,7 +228,7 @@ fn report_unused_parameter(tcx: TyCtxt<'_>, span: Span, kind: &str, name: &str)
|
|||
}
|
||||
|
||||
/// Enforce that we do not have two items in an impl with the same name.
|
||||
fn enforce_impl_items_are_distinct(tcx: TyCtxt<'_>, impl_item_refs: &[hir::ImplItemRef<'_>]) {
|
||||
fn enforce_impl_items_are_distinct(tcx: TyCtxt<'_>, impl_item_refs: &[hir::ImplItemRef]) {
|
||||
let mut seen_type_items = FxHashMap::default();
|
||||
let mut seen_value_items = FxHashMap::default();
|
||||
for impl_item_ref in impl_item_refs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue