diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-03-17 17:31:09 +0400 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-03-17 18:46:27 +0400 |
| commit | 5e0fc0459e6ffd70ffbc0e540cce8623f21809a9 (patch) | |
| tree | 5e15b93e72030bd59925b72415bf3db913d3e3d2 /tests/rustdoc-ui/intra-doc/import-inline-merge.rs | |
| parent | 2d64f229a09515978e6f338b821057a64334a0b5 (diff) | |
| download | rust-5e0fc0459e6ffd70ffbc0e540cce8623f21809a9.tar.gz rust-5e0fc0459e6ffd70ffbc0e540cce8623f21809a9.zip | |
rustdoc: Correctly merge import's and its target's docs in one more case
Diffstat (limited to 'tests/rustdoc-ui/intra-doc/import-inline-merge.rs')
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/import-inline-merge.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/import-inline-merge.rs b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs new file mode 100644 index 00000000000..31fef032b0f --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs @@ -0,0 +1,16 @@ +// Import for `A` is inlined and doc comments on the import and `A` itself are merged. +// After the merge they still have correct parent scopes to resolve both `[A]` and `[B]`. + +// check-pass + +#![allow(rustdoc::private_intra_doc_links)] + +mod m { + /// [B] + pub struct A {} + + pub struct B {} +} + +/// [A] +pub use m::A; |
