Compile golden files

We used to do this in the past, but then probably sometimes during changes to
the Bazel infrastructure we stopped. This CL brings this back in the form of an
empty `rust_test` that triggers the compilation of all bindings, but doesn't
test anything at runtime.

PiperOrigin-RevId: 446457767
diff --git a/rs_bindings_from_cc/test/golden/BUILD b/rs_bindings_from_cc/test/golden/BUILD
index 7f791f5..8925d9b 100644
--- a/rs_bindings_from_cc/test/golden/BUILD
+++ b/rs_bindings_from_cc/test/golden/BUILD
@@ -3,6 +3,7 @@
     "//rs_bindings_from_cc/test/golden:generate_bindings.bzl",
     "generate_bindings",
 )
+load("@rules_rust//rust:defs.bzl", "rust_test")
 
 licenses(["notice"])
 
@@ -56,6 +57,18 @@
     ],
 ) for name in TESTS]
 
+[rust_test(
+    name = name + "_rs_test",
+    srcs = ["empty_rs_test.rs"],
+    cc_deps = ["%s_cc" % name],
+) for name in TESTS if name not in [
+    # TODO(hlopko): These tests fail to compile, fix them.
+    "namespace",
+    "polymorphic",
+    "types",
+    "user_of_base_class",
+]]
+
 # Only there so build-cleaner doesn't try to add separate targets for generated files.
 filegroup(
     name = "generated_outputs",
diff --git a/rs_bindings_from_cc/test/golden/empty_rs_test.rs b/rs_bindings_from_cc/test/golden/empty_rs_test.rs
new file mode 100644
index 0000000..5d38c10
--- /dev/null
+++ b/rs_bindings_from_cc/test/golden/empty_rs_test.rs
@@ -0,0 +1,7 @@
+// 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
+
+// The purpose of this `rust_test` is to trigger compilation of the bindings
+// this targets depend on. Therefore this file is intentionally left empty, what
+// matters is `deps` attribute of the `rust_test` target in the BUILD file.