about summary refs log tree commit diff
path: root/tests/ui/attributes/crate-name-attr-validation.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-09 02:20:44 +0000
committerbors <bors@rust-lang.org>2025-06-09 02:20:44 +0000
commit334ba812755b974ecc46713fcdd38836b6182746 (patch)
tree97733c915e4e9299e6da38942a60d2fb2645e72a /tests/ui/attributes/crate-name-attr-validation.rs
parentc31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0 (diff)
parente91f985717687e7a960121667cf7d8f8010a6cd0 (diff)
downloadrust-334ba812755b974ecc46713fcdd38836b6182746.tar.gz
rust-334ba812755b974ecc46713fcdd38836b6182746.zip
Auto merge of #142220 - workingjubilee:rollup-idgfpof, r=workingjubilee
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#141803 (Remove rustc's notion of "preferred" alignment AKA `__alignof`)
 - rust-lang/rust#142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`)
 - rust-lang/rust#142089 (Replace all uses of sysroot_candidates with get_or_default_sysroot)
 - rust-lang/rust#142108 (compiler: Add track_caller to AbiMapping::unwrap)
 - rust-lang/rust#142132 (`tests/ui`: A New Order [6/N])
 - rust-lang/rust#142162 (UnsafePinned: update get() docs and signature to allow shared mutation)
 - rust-lang/rust#142171 (`tests/ui`: A New Order [7/N])
 - rust-lang/rust#142179 (store `target.min_global_align` as an `Align`)
 - rust-lang/rust#142183 (Added test for 30904)
 - rust-lang/rust#142194 (Remove all unused feature gates from the compiler)
 - rust-lang/rust#142199 (Do not free disk space in the `mingw-check-tidy` job)
 - rust-lang/rust#142210 (Run `mingw-check-tidy` on auto builds)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/attributes/crate-name-attr-validation.rs')
-rw-r--r--tests/ui/attributes/crate-name-attr-validation.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/attributes/crate-name-attr-validation.rs b/tests/ui/attributes/crate-name-attr-validation.rs
new file mode 100644
index 00000000000..e27893c3d25
--- /dev/null
+++ b/tests/ui/attributes/crate-name-attr-validation.rs
@@ -0,0 +1,9 @@
+//! Checks proper validation of the `#![crate_name]` attribute.
+
+//@ run-pass
+//@ compile-flags:--crate-name crate_name_attr_used -F unused-attributes
+
+
+#![crate_name = "crate_name_attr_used"]
+
+fn main() {}