Remove unused references to internal::DownCast (#19372)

Closes #19372

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/19372 from Tradias:remove-downcast f12602575d86d74ab4a58bc18f2be78ff5db66a5
PiperOrigin-RevId: 700363447
diff --git a/src/google/protobuf/extension_set_unittest.cc b/src/google/protobuf/extension_set_unittest.cc
index 511938a..f49ea9e 100644
--- a/src/google/protobuf/extension_set_unittest.cc
+++ b/src/google/protobuf/extension_set_unittest.cc
@@ -52,7 +52,6 @@
 
 namespace {
 
-using ::google::protobuf::internal::DownCast;
 using TestUtil::EqualsToSerialized;
 
 // This test closely mirrors google/protobuf/compiler/cpp/unittest.cc
diff --git a/src/google/protobuf/map_test.inc b/src/google/protobuf/map_test.inc
index ac0e766..af699ed 100644
--- a/src/google/protobuf/map_test.inc
+++ b/src/google/protobuf/map_test.inc
@@ -217,7 +217,6 @@
 };
 
 namespace {
-using internal::DownCast;
 
 // Map API Test =====================================================
 
diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
index f135a35..96a3091 100644
--- a/src/google/protobuf/message_lite.h
+++ b/src/google/protobuf/message_lite.h
@@ -1200,11 +1200,6 @@
   return p;
 }
 
-inline void AssertDownCast(const MessageLite& from, const MessageLite& to) {
-  ABSL_DCHECK(TypeId::Get(from) == TypeId::Get(to))
-      << "Cannot downcast " << from.GetTypeName() << " to " << to.GetTypeName();
-}
-
 template <bool test_call, typename MessageLite>
 PROTOBUF_ALWAYS_INLINE MessageLite* MessageCreator::PlacementNew(
     const MessageLite* prototype_for_func,
diff --git a/src/google/protobuf/repeated_field_reflection_unittest.inc b/src/google/protobuf/repeated_field_reflection_unittest.inc
index da4136f..cb9b09c 100644
--- a/src/google/protobuf/repeated_field_reflection_unittest.inc
+++ b/src/google/protobuf/repeated_field_reflection_unittest.inc
@@ -22,7 +22,6 @@
 namespace {
 
 
-using internal::DownCast;
 using UNITTEST::ForeignMessage;
 using UNITTEST::TestAllExtensions;
 using UNITTEST::TestAllTypes;