Expand test coverage for 1) `cc_std` and 2) `inline` namespace.

This CL expands test coverage of bindings for the C++ standard library
by adding additional headers to `LIBCXX_HEADERS` in
`rs_bindings_from_cc/BUILD` (this partially undoes https://github.com/google/crubit/commit/a8aea817b95644bade5d7dae043ef02ac10dcec8).  The
list of headers to add has been chosen in a somewhat arbitrary, ad-hoc
manner (trying a subset of headers and adding ones that didn't cause any
build failures).  In the long-term a more structured approach is
probably called for.

The additional headers cover the `std` namespace which helps highlight
the challenges associated with support for `inline` namespaces - this is
done by the new `test_limits` test in `test/cc_std` and by the new
`test/namespace/inline' directory.

PiperOrigin-RevId: 473306202
diff --git a/rs_bindings_from_cc/BUILD b/rs_bindings_from_cc/BUILD
index 2c8fbc1..bfd0222 100644
--- a/rs_bindings_from_cc/BUILD
+++ b/rs_bindings_from_cc/BUILD
@@ -460,7 +460,41 @@
     ],
 )
 
-LIBCXX_HEADERS = ["ctime"]
+LIBCXX_HEADERS = [
+    "atomic",
+    "cassert",
+    "cctype",
+    "cerrno",
+    "cfenv",
+    "cfloat",
+    "chrono",
+    "cinttypes",
+    "climits",
+    "cmath",
+    "condition_variable",
+    "csetjmp",
+    "csignal",
+    "cstdarg",
+    "cstddef",
+    "cstdint",
+    "cstdio",
+    "cstdlib",
+    "ctime",
+    "cuchar",
+    "cwchar",
+    "cwctype",
+    "initializer_list",
+    "limits",
+    "memory",
+    "mutex",
+    "new",
+    "numeric",
+    "ratio",
+    "scoped_allocator",
+    "string_view",
+    "tuple",
+    "type_traits",
+]
 
 LIBC_HEADERS = []
 
diff --git a/rs_bindings_from_cc/test/cc_std/test.rs b/rs_bindings_from_cc/test/cc_std/test.rs
index 74b1a9d..578c639 100644
--- a/rs_bindings_from_cc/test/cc_std/test.rs
+++ b/rs_bindings_from_cc/test/cc_std/test.rs
@@ -6,9 +6,11 @@
 
 #[cfg(test)]
 mod tests {
+    use cc_std::*;
+
     #[test]
-    fn test_return_value() {
-        use cc_std::*;
+    fn test_ctime() {
+        // Tests of items from the `<ctime>` header.
         ctor::emplace! {
             let _t = ctor::ctor!(tm {
                 tm_gmtoff: 0,
@@ -25,4 +27,17 @@
             });
         }
     }
+
+    #[test]
+    fn test_limits() {
+        // Tests of items from the `<limits>` header.
+        // https://en.cppreference.com/w/cpp/types/numeric_limits/float_round_style:
+        //
+        // TODO(b/244601795): Stop mentioning the `inline` `__u` namespace below
+        assert_eq!(0, std::__u::float_round_style::round_toward_zero.into());
+        assert_eq!(1, std::__u::float_round_style::round_to_nearest.into());
+        assert_eq!(2, std::__u::float_round_style::round_toward_infinity.into());
+        assert_eq!(3, std::__u::float_round_style::round_toward_neg_infinity.into());
+        assert_eq!(-1, std::__u::float_round_style::round_indeterminate.into());
+    }
 }
diff --git a/rs_bindings_from_cc/test/namespace/inline/BUILD b/rs_bindings_from_cc/test/namespace/inline/BUILD
new file mode 100644
index 0000000..6f5f721
--- /dev/null
+++ b/rs_bindings_from_cc/test/namespace/inline/BUILD
@@ -0,0 +1,16 @@
+"""End-to-end test of inheritance."""
+
+load("@rules_rust//rust:defs.bzl", "rust_test")
+
+licenses(["notice"])
+
+cc_library(
+    name = "inline",
+    hdrs = ["inline.h"],
+)
+
+rust_test(
+    name = "test",
+    srcs = ["test.rs"],
+    cc_deps = [":inline"],
+)
diff --git a/rs_bindings_from_cc/test/namespace/inline/inline.h b/rs_bindings_from_cc/test/namespace/inline/inline.h
new file mode 100644
index 0000000..7600466
--- /dev/null
+++ b/rs_bindings_from_cc/test/namespace/inline/inline.h
@@ -0,0 +1,34 @@
+// Part of the Crubit project, under the Apache License v2.0 with LLVM
+// Exceptions. See /LICENSE for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+#ifndef THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_
+#define THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_
+
+#pragma clang lifetime_elision
+
+namespace foo {
+inline namespace inline1 {
+
+struct MyStruct final {
+  int value;
+};
+
+inline int GetStructValue1(const foo::MyStruct& s) { return s.value; }
+
+inline int GetStructValue2(const foo::inline1::MyStruct& s) { return s.value; }
+
+}  // namespace inline1
+
+// Test coverage for the case where additional declarations appear in `inline1`,
+// but without `inline namespace ...`, just with `namespace inline1`.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winline-namespace-reopened-noninline"
+namespace inline1 {
+inline int GetStructValue3(const foo::MyStruct& s) { return s.value; }
+inline int GetStructValue4(const foo::inline1::MyStruct& s) { return s.value; }
+}  // namespace inline1
+#pragma clang diagnostic pop
+}  // namespace foo
+
+#endif  // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_
diff --git a/rs_bindings_from_cc/test/namespace/inline/test.rs b/rs_bindings_from_cc/test/namespace/inline/test.rs
new file mode 100644
index 0000000..505ca0a
--- /dev/null
+++ b/rs_bindings_from_cc/test/namespace/inline/test.rs
@@ -0,0 +1,33 @@
+// Part of the Crubit project, under the Apache License v2.0 with LLVM
+// Exceptions. See /LICENSE for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+#[cfg(test)]
+mod tests {
+    use inline::*;
+
+    #[test]
+    fn test_inline_namespaces() {
+        let s = foo::inline1::MyStruct { value: 123 };
+        assert_eq!(123, foo::inline1::GetStructValue1(&s));
+        assert_eq!(123, foo::inline1::GetStructValue2(&s));
+        assert_eq!(123, foo::inline1::GetStructValue3(&s));
+        assert_eq!(123, foo::inline1::GetStructValue4(&s));
+
+        // Notably, the C++ standard library uses `inline` namespaces, but we
+        // still want to be able to refer to `std::string`, rather than
+        // `std::__u::string`. Therefore the test verifies that the
+        // inner types and functions are also available in the parent
+        // namespace.
+        //
+        // TODO(b/244601795): Add test coverage below.
+        // > // `foo::MyStruct` should be a type alias for
+        // > // `foo::inline1::MyStruct`.
+        // > let mut s2 = foo::MyStruct { value: 456 };
+        // > s2 = s;
+        // > // The functions should be available as `foo::GetStructValue...`
+        // > // as well.
+        // > assert_eq!(123, foo::GetStructValue1(&s));
+        // > assert_eq!(123, foo::GetStructValue2(&s));
+    }
+}