Remove tests for invalid crate names (#2387)

Lovely and thorough though these tests are, they cause `bazel cquery
...` not work in the repo.

Fixes #2359

Co-authored-by: UebelAndre <github@uebelandre.com>
diff --git a/test/unit/crate_name/crate_name_test.bzl b/test/unit/crate_name/crate_name_test.bzl
index 8671951..e960e89 100644
--- a/test/unit/crate_name/crate_name_test.bzl
+++ b/test/unit/crate_name/crate_name_test.bzl
@@ -1,6 +1,6 @@
 """Unit tests for crate names."""
 
-load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
+load("@bazel_skylib//lib:unittest.bzl", "analysistest")
 load("//rust:defs.bzl", "rust_binary", "rust_library", "rust_shared_library", "rust_static_library", "rust_test")
 load("//test/unit:common.bzl", "assert_argv_contains", "assert_argv_contains_prefix_not")
 
@@ -46,16 +46,6 @@
     assert_argv_contains(env, tut.actions[0], "--crate-name=custom_name")
     return analysistest.end(env)
 
-def _invalid_default_crate_name_test_impl(ctx):
-    env = analysistest.begin(ctx)
-    asserts.expect_failure(env, "contains invalid character(s): @")
-    return analysistest.end(env)
-
-def _invalid_custom_crate_name_test_impl(ctx):
-    env = analysistest.begin(ctx)
-    asserts.expect_failure(env, "contains invalid character(s): -")
-    return analysistest.end(env)
-
 def _slib_library_name_test_impl(ctx):
     """Regression test for extra-filename.
 
@@ -102,14 +92,6 @@
 custom_crate_name_test_test = analysistest.make(
     _custom_crate_name_test_test_impl,
 )
-invalid_default_crate_name_test = analysistest.make(
-    _invalid_default_crate_name_test_impl,
-    expect_failure = True,
-)
-invalid_custom_crate_name_test = analysistest.make(
-    _invalid_custom_crate_name_test_impl,
-    expect_failure = True,
-)
 slib_library_name_test = analysistest.make(
     _slib_library_name_test_impl,
 )
@@ -158,21 +140,6 @@
     )
 
     rust_library(
-        name = "invalid@default-crate-name",
-        srcs = ["lib.rs"],
-        edition = "2018",
-        tags = ["manual", "norustfmt"],
-    )
-
-    rust_library(
-        name = "invalid-custom-crate-name",
-        crate_name = "hyphens-not-allowed",
-        srcs = ["lib.rs"],
-        edition = "2018",
-        tags = ["manual", "norustfmt"],
-    )
-
-    rust_library(
         name = "slib",
         srcs = ["slib.rs"],
         edition = "2018",
@@ -225,16 +192,6 @@
         target_under_test = ":custom-crate-name-test",
     )
 
-    invalid_default_crate_name_test(
-        name = "invalid_default_crate_name_test",
-        target_under_test = ":invalid@default-crate-name",
-    )
-
-    invalid_custom_crate_name_test(
-        name = "invalid_custom_crate_name_test",
-        target_under_test = ":invalid-custom-crate-name",
-    )
-
     no_extra_filename_test(
         name = "no_extra_filename_for_shared_library_test",
         target_under_test = ":shared_lib",
@@ -263,7 +220,5 @@
             ":custom_crate_name_binary_test",
             ":default_crate_name_test_test",
             ":custom_crate_name_test_test",
-            ":invalid_default_crate_name_test",
-            ":invalid_custom_crate_name_test",
         ],
     )