summaryrefslogtreecommitdiffstats
path: root/tests/run-make/crate-data-smoke/crate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/crate-data-smoke/crate.rs')
-rw-r--r--tests/run-make/crate-data-smoke/crate.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/run-make/crate-data-smoke/crate.rs b/tests/run-make/crate-data-smoke/crate.rs
new file mode 100644
index 000000000..a48a6f51c
--- /dev/null
+++ b/tests/run-make/crate-data-smoke/crate.rs
@@ -0,0 +1,7 @@
+#![crate_name = "foo"]
+
+// Querying about the crate metadata should *not* parse the entire crate, it
+// only needs the crate attributes (which are guaranteed to be at the top) be
+// sure that if we have an error like a missing module that we can still query
+// about the crate id.
+mod error;