about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-17 19:22:21 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-17 19:22:21 +0800
commit88f8bf7e560f5ea9c2efe2f587b2586f95984c4c (patch)
treee8624b62cb40c211862fea2f710e2c85af149258
parent0fc6be7898578e7d0c915f14f9ddb3ac71673796 (diff)
downloadrust-88f8bf7e560f5ea9c2efe2f587b2586f95984c4c.tar.gz
rust-88f8bf7e560f5ea9c2efe2f587b2586f95984c4c.zip
Adjust `tests/ui/attr-shebang.rs`
- Move `tests/ui/attr-shebang.rs` to `tests/ui/attributes/`.
- Downgrade test to `check-pass`, this would fail very early if the
  parser did not accept `#![..]` attributes.
- Briefly document test intent.
-rw-r--r--tests/ui/attr-shebang.rs5
-rw-r--r--tests/ui/attributes/attr-shebang.rs7
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/ui/attr-shebang.rs b/tests/ui/attr-shebang.rs
deleted file mode 100644
index 67c371aeaac..00000000000
--- a/tests/ui/attr-shebang.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-//@ run-pass
-
-#![allow(stable_features)]
-#![feature(rust1)]
-pub fn main() { }
diff --git a/tests/ui/attributes/attr-shebang.rs b/tests/ui/attributes/attr-shebang.rs
new file mode 100644
index 00000000000..af446dc56e3
--- /dev/null
+++ b/tests/ui/attributes/attr-shebang.rs
@@ -0,0 +1,7 @@
+//! Check that we accept crate-level inner attributes with the `#![..]` shebang syntax.
+
+//@ check-pass
+
+#![allow(stable_features)]
+#![feature(rust1)]
+pub fn main() { }