attr: target_from_impl_item can just be private.

This commit is contained in:
Eduard-Mihai Burtescu 2021-03-22 05:02:42 +02:00 committed by Eduard-Mihai Burtescu
parent b3b3fbec98
commit 7f94fea3b6

View File

@ -14,10 +14,7 @@ use rustc_middle::ty::TyCtxt;
use std::rc::Rc;
// FIXME(eddyb) make this reusable from somewhere in `rustc`.
pub(crate) fn target_from_impl_item<'tcx>(
tcx: TyCtxt<'tcx>,
impl_item: &hir::ImplItem<'_>,
) -> Target {
fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>) -> Target {
match impl_item.kind {
hir::ImplItemKind::Const(..) => Target::AssocConst,
hir::ImplItemKind::Fn(..) => {