Make check_cast private

This commit is contained in:
Yusuke Tanaka
2021-02-11 01:42:12 +09:00
committed by flip1995
parent 8a8f7b4cf5
commit bf000985f5

View File

@@ -68,12 +68,7 @@ pub(super) fn can_be_expressed_as_pointer_cast<'tcx>(
/// the cast. In certain cases, including some invalid casts from array references /// the cast. In certain cases, including some invalid casts from array references
/// to pointers, this may cause additional errors to be emitted and/or ICE error /// to pointers, this may cause additional errors to be emitted and/or ICE error
/// messages. This function will panic if that occurs. /// messages. This function will panic if that occurs.
pub(super) fn check_cast<'tcx>( fn check_cast<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>, from_ty: Ty<'tcx>, to_ty: Ty<'tcx>) -> Option<CastKind> {
cx: &LateContext<'tcx>,
e: &'tcx Expr<'_>,
from_ty: Ty<'tcx>,
to_ty: Ty<'tcx>,
) -> Option<CastKind> {
let hir_id = e.hir_id; let hir_id = e.hir_id;
let local_def_id = hir_id.owner; let local_def_id = hir_id.owner;