summaryrefslogtreecommitdiff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-03-27 18:56:19 +0200
committerGitHub <noreply@github.com>2023-03-27 18:56:19 +0200
commit52c8084f912e3728b8b06ae7e077521dba89d326 (patch)
tree93b909364d3835c37eb63e41953eb3d9d1bde956 /tests/rustdoc-ui
parentdd19135b044cd21a9c3ae7ae87620bf41a208066 (diff)
parent87ea9941d530194f9d04ed3bb1472509f786dd4e (diff)
downloadrust-52c8084f912e3728b8b06ae7e077521dba89d326.tar.gz
Rollup merge of #109330 - GuillaumeGomez:intermediate-reexport-intra-doc-ice, r=petrochenkov
rustdoc: Fix ICE for intra-doc link on intermediate re-export Fixes https://github.com/rust-lang/rust/issues/109282. This PR is based on #109266 as it includes its commit to make this work. `@petrochenkov:` It was exactly as you predicted, adding the `DefId` to the attributes fixed the error for intermediate re-exports as well. Thanks a lot! r? `@petrochenkov`
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/issue-109282-import-inline-merge.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issue-109282-import-inline-merge.rs
new file mode 100644
index 00000000000..0ec8523222f
--- /dev/null
+++ b/tests/rustdoc-ui/issue-109282-import-inline-merge.rs
@@ -0,0 +1,14 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/109282>.
+// Import for `ValueEnum` is inlined and doc comments on the import and `ValueEnum` itself are
+// merged. After the merge they still have correct parent scopes to resolve both `[ValueEnum]`.
+
+// check-pass
+
+mod m {
+ pub enum ValueEnum {}
+}
+mod m2 {
+ /// [`ValueEnum`]
+ pub use crate::m::ValueEnum;
+}
+pub use m2::ValueEnum;