Change the default visibility for packages to //visibility:private
and then change individual build rules back to their prior visibility.

The motivation for this change is making sure future additions are
private by default so that new rules are not accidentally public.

Some of the rules that are currently public were not meant to be, and
the fact that they are marked public does not mean they should be
used. As always, the rule is never spell out anything with the word
internal (or any synonym for internal). Some of these accidentally
public rules will be manually corrected with future changes.

PiperOrigin-RevId: 940605671
Change-Id: I280ef60883a8a4e6281468f835756974793025f5
diff --git a/absl/functional/BUILD.bazel b/absl/functional/BUILD.bazel
index 0013f47..c41b211 100644
--- a/absl/functional/BUILD.bazel
+++ b/absl/functional/BUILD.bazel
@@ -25,7 +25,7 @@
 )
 
 package(
-    default_visibility = ["//visibility:public"],
+    default_visibility = ["//visibility:private"],
     features = [
         "header_modules",
         "layering_check",
@@ -41,6 +41,7 @@
     hdrs = ["any_invocable.h"],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    visibility = ["//visibility:public"],
     deps = [
         "//absl/base:config",
         "//absl/base:core_headers",
@@ -80,6 +81,7 @@
     hdrs = ["bind_back.h"],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    visibility = ["//visibility:public"],
     deps = [
         "//absl/base:config",
         "//absl/container:compressed_tuple",
@@ -106,6 +108,7 @@
     hdrs = ["bind_front.h"],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    visibility = ["//visibility:public"],
     deps = [
         "//absl/container:compressed_tuple",
         "//absl/meta:type_traits",
@@ -132,6 +135,7 @@
     hdrs = ["function_ref.h"],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    visibility = ["//visibility:public"],
     deps = [
         ":any_invocable",
         "//absl/base:config",
@@ -163,6 +167,7 @@
     hdrs = ["overload.h"],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    visibility = ["//visibility:public"],
     deps = [
         "//absl/base:config",
         "//absl/meta:type_traits",