about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-08-17 05:08:05 +0900
committerGitHub <noreply@github.com>2022-08-17 05:08:05 +0900
commitaf74e7232f4213a69f1662beb8d309884a66def5 (patch)
tree6ed8faa78f9eb62ce9f0d4f9e4499307c4d5600f /src/test
parent033387a6af6e42a5574a4c64a311228bf71cb4b5 (diff)
parentdbeb506eaefdda5d9d7927c4d10d6d13a336eaf3 (diff)
downloadrust-af74e7232f4213a69f1662beb8d309884a66def5.tar.gz
rust-af74e7232f4213a69f1662beb8d309884a66def5.zip
Rollup merge of #100630 - Enselic:export_extern_crate_as_self, r=GuillaumeGomez
rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`

Closes #100531

r? `@GuillaumeGomez`

`@rustbot` labels +A-rustdoc-json +T-rustdoc
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-json/reexport/export_extern_crate_as_self.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/reexport/export_extern_crate_as_self.rs b/src/test/rustdoc-json/reexport/export_extern_crate_as_self.rs
new file mode 100644
index 00000000000..fda38056a09
--- /dev/null
+++ b/src/test/rustdoc-json/reexport/export_extern_crate_as_self.rs
@@ -0,0 +1,11 @@
+//! Regression test for <https://github.com/rust-lang/rust/issues/100531>
+
+#![feature(no_core)]
+#![no_core]
+
+#![crate_name = "export_extern_crate_as_self"]
+
+// ignore-tidy-linelength
+
+// @is export_extern_crate_as_self.json "$.index[*][?(@.kind=='module')].name" \"export_extern_crate_as_self\"
+pub extern crate self as export_extern_crate_as_self; // Must be the same name as the crate already has