about summary refs log tree commit diff
path: root/tests/ui/attributes/z-crate-attr/crate-name.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/z-crate-attr/crate-name.rs')
-rw-r--r--tests/ui/attributes/z-crate-attr/crate-name.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/attributes/z-crate-attr/crate-name.rs b/tests/ui/attributes/z-crate-attr/crate-name.rs
new file mode 100644
index 00000000000..d49830390e2
--- /dev/null
+++ b/tests/ui/attributes/z-crate-attr/crate-name.rs
@@ -0,0 +1,6 @@
+// Ensure that `crate_name` and `crate_type` can be set through `-Z crate-attr`.
+//@ check-pass
+//@ compile-flags: -Zcrate-attr=crate_name="override"
+fn main() {
+    assert_eq!(module_path!(), "r#override");
+}